Page MenuHomePhabricator

D11616.diff
No OneTemporary

D11616.diff

diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -36,6 +36,11 @@
convertReportsToReplaceReportOps,
reportStoreOpsHandlers,
} from 'lib/ops/report-store-ops.js';
+import {
+ type ClientDBThreadActivityStoreOperation,
+ threadActivityStoreOpsHandlers,
+ type ReplaceThreadActivityEntryOperation,
+} from 'lib/ops/thread-activity-store-ops.js';
import type { ClientDBThreadStoreOperation } from 'lib/ops/thread-store-ops.js';
import { threadStoreOpsHandlers } from 'lib/ops/thread-store-ops.js';
import {
@@ -1246,7 +1251,32 @@
}
return { ...state, cookie: null };
}
+ return state;
+ },
+ [71]: async (state: AppState) => {
+ const replaceOps: $ReadOnlyArray<ReplaceThreadActivityEntryOperation> =
+ entries(state.threadActivityStore).map(([threadID, entry]) => ({
+ type: 'replace_thread_activity_entry',
+ payload: {
+ id: threadID,
+ threadActivityStoreEntry: entry,
+ },
+ }));
+
+ const dbOperations: $ReadOnlyArray<ClientDBThreadActivityStoreOperation> =
+ threadActivityStoreOpsHandlers.convertOpsToClientDBOps([
+ { type: 'remove_all_thread_activity_entries' },
+ ...replaceOps,
+ ]);
+ try {
+ await commCoreModule.processThreadActivityStoreOperations(dbOperations);
+ } catch (exception) {
+ if (isTaskCancelledError(exception)) {
+ return state;
+ }
+ return handleReduxMigrationFailure(state);
+ }
return state;
},
};
@@ -1270,7 +1300,7 @@
storage: AsyncStorage,
blacklist: persistBlacklist,
debug: __DEV__,
- version: 70,
+ version: 71,
transforms: [
messageStoreMessagesBlocklistTransform,
reportStoreTransform,

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 30, 11:30 PM (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2602771
Default Alt Text
D11616.diff (1 KB)

Event Timeline