Page MenuHomePhabricator

D4961.diff
No OneTemporary

D4961.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
@@ -77,6 +77,7 @@
FetchJSONOptions,
FetchJSONServerResponse,
} from 'lib/utils/fetch-json';
+import { values } from 'lib/utils/objects';
import { useIsReportEnabled } from 'lib/utils/report-utils';
import { disposeTempFile } from '../media/file-utils';
@@ -371,12 +372,9 @@
return true;
}
const { pendingUploads } = this.state;
- return Object.keys(pendingUploads).some(localMessageID => {
- const messagePendingUploads = pendingUploads[localMessageID];
- return Object.keys(messagePendingUploads).some(
- localUploadID => !messagePendingUploads[localUploadID].failed,
- );
- });
+ return values(pendingUploads).some(messagePendingUploads =>
+ values(messagePendingUploads).some(upload => !upload.failed),
+ );
};
sendTextMessage = async (
@@ -972,9 +970,7 @@
if (!pendingUploads) {
return false;
}
- return Object.keys(pendingUploads).some(
- localUploadID => pendingUploads[localUploadID].failed,
- );
+ return values(pendingUploads).some(upload => upload.failed);
};
addReply = (message: string) => {

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 12:47 AM (13 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2566924
Default Alt Text
D4961.diff (1 KB)

Event Timeline