Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3515384
D7910.id27120.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
D7910.id27120.diff
View Options
diff --git a/lib/utils/report-utils.js b/lib/utils/report-utils.js
--- a/lib/utils/report-utils.js
+++ b/lib/utils/report-utils.js
@@ -1,7 +1,6 @@
// @flow
import { useSelector } from './redux-utils.js';
-import { getUUID } from './uuid.js';
import {
type SupportedReports,
type EnabledReports,
@@ -27,13 +26,4 @@
);
}
-function assignReportsID(
- reports: $ReadOnlyArray<ClientReportCreationRequest>,
-): $ReadOnlyArray<ClientReportCreationRequest> {
- return reports.map((report: ClientReportCreationRequest) => ({
- ...report,
- id: getUUID(),
- }));
-}
-
-export { useIsReportEnabled, isReportEnabled, assignReportsID };
+export { useIsReportEnabled, isReportEnabled };
diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -36,12 +36,12 @@
translateRawMessageInfoToClientDBMessageInfo,
} from 'lib/utils/message-ops-utils.js';
import { defaultNotifPermissionAlertInfo } from 'lib/utils/push-alerts.js';
-import { assignReportsID } from 'lib/utils/report-utils.js';
import {
convertClientDBThreadInfoToRawThreadInfo,
convertRawThreadInfoToClientDBThreadInfo,
convertThreadStoreOperationsToClientDBOperations,
} from 'lib/utils/thread-ops-utils.js';
+import { getUUID } from 'lib/utils/uuid.js';
import { updateClientDBThreadStoreThreadInfos } from './client-db-utils.js';
import { migrateThreadStoreForEditThreadPermissions } from './edit-thread-permission-migration.js';
@@ -537,7 +537,10 @@
[40]: state =>
updateClientDBThreadStoreThreadInfos(state, updateRolesAndPermissions),
[41]: (state: AppState) => {
- const queuedReports = assignReportsID(state.reportStore.queuedReports);
+ const queuedReports = state.reportStore.queuedReports.map(report => ({
+ ...report,
+ id: getUUID(),
+ }));
return {
...state,
reportStore: { ...state.reportStore, queuedReports },
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 8:41 AM (18 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2694187
Default Alt Text
D7910.id27120.diff (1 KB)
Attached To
Mode
D7910: [lib] extract local id field before sending report
Attached
Detach File
Event Timeline
Log In to Comment