Page MenuHomePhorge

D9110.1765069530.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D9110.1765069530.diff

diff --git a/web/redux/persist.js b/web/redux/persist.js
--- a/web/redux/persist.js
+++ b/web/redux/persist.js
@@ -53,30 +53,6 @@
},
};
},
- [2]: async state => {
- const databaseModule = await getDatabaseModule();
- const isDatabaseSupported = await databaseModule.isDatabaseSupported();
- if (!isDatabaseSupported) {
- return state;
- }
-
- const { drafts } = state.draftStore;
- const draftStoreOperations = [];
- for (const key in drafts) {
- const text = drafts[key];
- draftStoreOperations.push({
- type: 'update',
- payload: { key, text },
- });
- }
-
- await databaseModule.schedule({
- type: workerRequestMessageTypes.PROCESS_STORE_OPERATIONS,
- storeOperations: { draftStoreOperations },
- });
-
- return state;
- },
[3]: async (state: AppState) => {
let newState = state;
if (state.draftStore) {
@@ -125,6 +101,34 @@
},
};
},
+ [5]: async state => {
+ const databaseModule = await getDatabaseModule();
+ const isDatabaseSupported = await databaseModule.isDatabaseSupported();
+ if (!isDatabaseSupported) {
+ return state;
+ }
+
+ if (!state.draftStore) {
+ return state;
+ }
+
+ const { drafts } = state.draftStore;
+ const draftStoreOperations = [];
+ for (const key in drafts) {
+ const text = drafts[key];
+ draftStoreOperations.push({
+ type: 'update',
+ payload: { key, text },
+ });
+ }
+
+ await databaseModule.schedule({
+ type: workerRequestMessageTypes.PROCESS_STORE_OPERATIONS,
+ storeOperations: { draftStoreOperations },
+ });
+
+ return state;
+ },
};
const persistWhitelist = [
@@ -234,7 +238,7 @@
{ debug: isDev },
migrateStorageToSQLite,
): any),
- version: 4,
+ version: 5,
transforms: [keyserverStoreTransform],
};

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 7, 1:05 AM (11 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5841834
Default Alt Text
D9110.1765069530.diff (1 KB)

Event Timeline