Page MenuHomePhabricator

D7910.id27120.diff
No OneTemporary

D7910.id27120.diff

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

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)

Event Timeline