Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32210629
D14901.1765132234.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D14901.1765132234.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D14901: [web][native] migrate holders to SQLite
Attached
Detach File
Event Timeline
Log In to Comment