Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3710414
D11349.id38303.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
D11349.id38303.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D11349: [native] migrate integrityStore to SQLite
Attached
Detach File
Event Timeline
Log In to Comment