Page MenuHomePhabricator

D8150.id27554.diff
No OneTemporary

D8150.id27554.diff

diff --git a/native/avatars/avatar-hooks.js b/native/avatars/avatar-hooks.js
--- a/native/avatars/avatar-hooks.js
+++ b/native/avatars/avatar-hooks.js
@@ -114,14 +114,14 @@
}
function useUploadSelectedMedia(
- setProcessingOrUploadInProgress: (inProgress: boolean) => mixed,
+ setProcessingOrUploadInProgress?: (inProgress: boolean) => mixed,
): (selection: NativeMediaSelection) => Promise<?ImageAvatarDBContent> {
const processSelectedMedia = useProcessSelectedMedia();
const uploadProcessedMedia = useUploadProcessedMedia();
return React.useCallback(
async (selection: NativeMediaSelection) => {
- setProcessingOrUploadInProgress(true);
+ setProcessingOrUploadInProgress?.(true);
const urisToBeDisposed: Set<string> = new Set([selection.uri]);
let processedMedia;
@@ -136,7 +136,7 @@
'Media processing failed',
'Unable to process selected media.',
);
- setProcessingOrUploadInProgress(false);
+ setProcessingOrUploadInProgress?.(false);
return undefined;
}
@@ -146,7 +146,7 @@
'Media processing failed',
'Unable to process selected media.',
);
- setProcessingOrUploadInProgress(false);
+ setProcessingOrUploadInProgress?.(false);
return undefined;
}
@@ -160,7 +160,7 @@
'Media upload failed',
'Unable to upload selected media. Please try again.',
);
- setProcessingOrUploadInProgress(false);
+ setProcessingOrUploadInProgress?.(false);
return undefined;
}

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 10, 9:22 PM (15 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2850330
Default Alt Text
D8150.id27554.diff (1 KB)

Event Timeline