Page MenuHomePhabricator

D4900.id15839.diff
No OneTemporary

D4900.id15839.diff

diff --git a/native/input/input-state-container.react.js b/native/input/input-state-container.react.js
--- a/native/input/input-state-container.react.js
+++ b/native/input/input-state-container.react.js
@@ -601,7 +601,7 @@
let errorMessage;
let reportPromise;
- const finish = async (result: MediaMissionResult) => {
+ const onUploadFinished = async (result: MediaMissionResult) => {
if (!this.props.mediaReportsEnabled) {
return errorMessage;
}
@@ -617,7 +617,7 @@
);
return errorMessage;
};
- const fail = (mediaID: string, message: string) => {
+ const onUploadFailed = (mediaID: string, message: string) => {
errorMessage = message;
this.handleUploadFailure(localMessageID, mediaID, message);
userTime = Date.now() - start;
@@ -637,13 +637,13 @@
processResult.reason === 'video_too_long'
? `can't do vids longer than ${videoDurationLimit}min`
: 'processing failed';
- fail(localMediaID, message);
- return await finish(processResult);
+ onUploadFailed(localMediaID, message);
+ return await onUploadFinished(processResult);
}
processedMedia = processResult;
} catch (e) {
- fail(localMediaID, 'processing failed');
- return await finish({
+ onUploadFailed(localMediaID, 'processing failed');
+ return await onUploadFinished({
success: false,
reason: 'processing_exception',
time: Date.now() - processingStart,
@@ -677,7 +677,7 @@
mediaMissionResult = { success: true };
} catch (e) {
uploadExceptionMessage = getMessageForException(e);
- fail(localMediaID, 'upload failed');
+ onUploadFailed(localMediaID, 'upload failed');
mediaMissionResult = {
success: false,
reason: 'http_upload_failed',
@@ -780,7 +780,7 @@
await Promise.all(promises);
- return await finish(mediaMissionResult);
+ return await onUploadFinished(mediaMissionResult);
}
mediaProcessConfig(localMessageID: string, localID: string) {

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 4:20 PM (19 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2571534
Default Alt Text
D4900.id15839.diff (2 KB)

Event Timeline