Page MenuHomePhorge

D14901.1765132234.diff
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

D14901.1765132234.diff

diff --git a/native/redux/persist-constants.js b/native/redux/persist-constants.js
--- a/native/redux/persist-constants.js
+++ b/native/redux/persist-constants.js
@@ -5,6 +5,6 @@
// NOTE: renaming this constant requires updating
// `native/native_rust_library/build.rs` to correctly
// scrap Redux state version from this file.
-const storeVersion = 93;
+const storeVersion = 94;
export { rootKey, storeVersion };
diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -22,6 +22,10 @@
ReplaceEntryOperation,
} from 'lib/ops/entries-store-ops';
import { entryStoreOpsHandlers } from 'lib/ops/entries-store-ops.js';
+import {
+ type HolderStoreOperation,
+ createReplaceHoldersOperation,
+} from 'lib/ops/holder-store-ops.js';
import {
type ClientDBIntegrityStoreOperation,
integrityStoreOpsHandlers,
@@ -1666,6 +1670,26 @@
},
};
}: MigrationFunction<NavInfo, AppState>),
+ [94]: (async (state: AppState) => {
+ const storedHolders = state.holderStore.storedHolders;
+
+ const holderItems = entries(storedHolders).map(([hash, holderInfo]) => ({
+ hash,
+ holder: holderInfo.holder,
+ status: holderInfo.status,
+ }));
+
+ const operations: $ReadOnlyArray<HolderStoreOperation> = [
+ createReplaceHoldersOperation(holderItems),
+ ];
+
+ return {
+ state,
+ ops: {
+ holderStoreOperations: operations,
+ },
+ };
+ }: MigrationFunction<NavInfo, AppState>),
});
const persistConfig = {
diff --git a/web/redux/persist-constants.js b/web/redux/persist-constants.js
--- a/web/redux/persist-constants.js
+++ b/web/redux/persist-constants.js
@@ -3,6 +3,6 @@
const rootKey = 'root';
const rootKeyPrefix = 'persist:';
const completeRootKey = `${rootKeyPrefix}${rootKey}`;
-const storeVersion = 93;
+const storeVersion = 94;
export { rootKey, rootKeyPrefix, completeRootKey, storeVersion };
diff --git a/web/redux/persist.js b/web/redux/persist.js
--- a/web/redux/persist.js
+++ b/web/redux/persist.js
@@ -7,6 +7,10 @@
import type { PersistConfig } from 'redux-persist/src/types.js';
import { createReplaceThreadOperation } from 'lib/ops/create-replace-thread-operation.js';
+import {
+ type HolderStoreOperation,
+ createReplaceHoldersOperation,
+} from 'lib/ops/holder-store-ops.js';
import {
type ClientDBKeyserverStoreOperation,
keyserverStoreOpsHandlers,
@@ -880,6 +884,26 @@
},
};
}: MigrationFunction<WebNavInfo, AppState>),
+ [94]: (async (state: AppState) => {
+ const storedHolders = state.holderStore.storedHolders;
+
+ const holderItems = entries(storedHolders).map(([hash, holderInfo]) => ({
+ hash,
+ holder: holderInfo.holder,
+ status: holderInfo.status,
+ }));
+
+ const operations: $ReadOnlyArray<HolderStoreOperation> = [
+ createReplaceHoldersOperation(holderItems),
+ ];
+
+ return {
+ state,
+ ops: {
+ holderStoreOperations: operations,
+ },
+ };
+ }: MigrationFunction<WebNavInfo, AppState>),
};
const persistConfig: PersistConfig = {

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 7, 6:30 PM (20 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5844421
Default Alt Text
D14901.1765132234.diff (3 KB)

Event Timeline