Page MenuHomePhabricator

D11349.id38303.diff
No OneTemporary

D11349.id38303.diff

diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -16,6 +16,11 @@
convertConnectionInfoToNewIDSchema,
} from 'lib/_generated/migration-utils.js';
import { extractKeyserverIDFromID } from 'lib/keyserver-conn/keyserver-call-utils.js';
+import {
+ type ClientDBIntegrityStoreOperation,
+ integrityStoreOpsHandlers,
+ type ReplaceIntegrityThreadHashesOperation,
+} from 'lib/ops/integrity-store-ops.js';
import {
type ClientDBKeyserverStoreOperation,
keyserverStoreOpsHandlers,
@@ -1133,6 +1138,30 @@
patchRawThreadInfosWithSpecialRole,
handleReduxMigrationFailure,
),
+ [65]: async (state: AppState) => {
+ const replaceOp: ReplaceIntegrityThreadHashesOperation = {
+ type: 'replace_integrity_thread_hashes',
+ payload: {
+ threadHashes: state.integrityStore.threadHashes,
+ },
+ };
+
+ const dbOperations: $ReadOnlyArray<ClientDBIntegrityStoreOperation> =
+ integrityStoreOpsHandlers.convertOpsToClientDBOps([
+ { type: 'remove_all_integrity_thread_hashes' },
+ replaceOp,
+ ]);
+
+ try {
+ await commCoreModule.processIntegrityStoreOperations(dbOperations);
+ } catch (exception) {
+ if (isTaskCancelledError(exception)) {
+ return state;
+ }
+ return handleReduxMigrationFailure(state);
+ }
+ return state;
+ },
};
// After migration 31, we'll no longer want to persist `messageStore.messages`
@@ -1200,7 +1229,7 @@
storage: AsyncStorage,
blacklist: persistBlacklist,
debug: __DEV__,
- version: 63,
+ version: 65,
transforms: [
messageStoreMessagesBlocklistTransform,
reportStoreTransform,

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 9, 4:38 AM (5 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2827677
Default Alt Text
D11349.id38303.diff (1 KB)

Event Timeline