Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3342234
D4961.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4961.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
@@ -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
Details
Attached
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)
Attached To
Mode
D4961: [native] Use `values(...)` in `InputStateContainer`
Attached
Detach File
Event Timeline
Log In to Comment