Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32213172
D4890.1765146201.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D4890.1765146201.diff
View Options
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
@@ -531,14 +531,14 @@
for (const uploadFileInput of uploadFileInputs) {
const { localMediaID } = uploadFileInput.ids;
pendingUploads[localMediaID] = {
- failed: null,
+ failed: false,
progressPercent: 0,
processingStep: null,
};
if (uploadFileInput.ids.type === 'video') {
const { localThumbnailID } = uploadFileInput.ids;
pendingUploads[localThumbnailID] = {
- failed: null,
+ failed: false,
progressPercent: 0,
processingStep: null,
};
@@ -944,7 +944,8 @@
...uploads,
[localUploadID]: {
...upload,
- failed: message,
+ failed: true,
+ failureMessage: message,
progressPercent: 0,
},
},
@@ -979,13 +980,9 @@
if (!pendingUploads) {
return false;
}
- for (const localUploadID in pendingUploads) {
- const { failed } = pendingUploads[localUploadID];
- if (failed) {
- return true;
- }
- }
- return false;
+ return Object.keys(pendingUploads).some(
+ localUploadID => pendingUploads[localUploadID].failed,
+ );
};
addReply = (message: string) => {
@@ -1170,7 +1167,7 @@
// which makes the UI show pending status instead of error messages
for (const singleMedia of retryMedia) {
pendingUploads[singleMedia.id] = {
- failed: null,
+ failed: false,
progressPercent: 0,
processingStep: null,
};
@@ -1178,7 +1175,7 @@
const { thumbnailID } = singleMedia;
invariant(thumbnailID, 'thumbnailID not null or undefined');
pendingUploads[thumbnailID] = {
- failed: null,
+ failed: false,
progressPercent: 0,
processingStep: null,
};
diff --git a/native/input/input-state.js b/native/input/input-state.js
--- a/native/input/input-state.js
+++ b/native/input/input-state.js
@@ -9,9 +9,10 @@
export type MultimediaProcessingStep = 'transcoding' | 'uploading';
export type PendingMultimediaUpload = {
- +failed: ?string,
+ +failed: boolean,
+progressPercent: number,
+processingStep: ?MultimediaProcessingStep,
+ +failureMessage?: ?string,
};
export type MessagePendingUploads = {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 7, 10:23 PM (15 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5846238
Default Alt Text
D4890.1765146201.diff (2 KB)
Attached To
Mode
D4890: [native] Make `failed` `boolean` in `PendingMultimediaUpload`
Attached
Detach File
Event Timeline
Log In to Comment