Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3389793
D14049.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D14049.diff
View Options
diff --git a/lib/types/backup-types.js b/lib/types/backup-types.js
--- a/lib/types/backup-types.js
+++ b/lib/types/backup-types.js
@@ -49,3 +49,12 @@
pickledAccount: t.String,
},
);
+
+type LocalLatestBakupInfo = {
+ +backupID: string,
+ +timestamp: number,
+};
+
+export type BackupStore = {
+ latestBackupInfo: ?LocalLatestBakupInfo,
+};
diff --git a/native/redux/default-state.js b/native/redux/default-state.js
--- a/native/redux/default-state.js
+++ b/native/redux/default-state.js
@@ -107,6 +107,9 @@
holderStore: {
storedHolders: {},
},
+ backupStore: {
+ latestBackupInfo: null,
+ },
}: AppState);
export { defaultState };
diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -1506,6 +1506,15 @@
[messageTypes.MULTIMEDIA],
handleReduxMigrationFailure,
): MigrationFunction<NavInfo, AppState>),
+ [86]: (async (state: any) => {
+ return {
+ state: {
+ ...state,
+ backupStore: null,
+ },
+ ops: {},
+ };
+ }: MigrationFunction<NavInfo, AppState>),
});
// NOTE: renaming this object, and especially the `version` property
@@ -1516,7 +1525,7 @@
storage: AsyncStorage,
blacklist: persistBlacklist,
debug: __DEV__,
- version: 85,
+ version: 86,
transforms: [
messageStoreMessagesBlocklistTransform,
reportStoreTransform,
diff --git a/native/redux/state-types.js b/native/redux/state-types.js
--- a/native/redux/state-types.js
+++ b/native/redux/state-types.js
@@ -5,6 +5,7 @@
import type { AlertStore } from 'lib/types/alert-types.js';
import type { AuxUserStore } from 'lib/types/aux-user-types.js';
+import type { BackupStore } from 'lib/types/backup-types.js';
import type { CommunityStore } from 'lib/types/community-types.js';
import type { DBOpsStore } from 'lib/types/db-ops-types';
import type { QueuedDMOperations } from 'lib/types/dm-ops';
@@ -88,6 +89,7 @@
+tunnelbrokerDeviceToken: TunnelbrokerDeviceToken,
+queuedDMOperations: QueuedDMOperations,
+holderStore: HolderStore,
+ +backupStore: BackupStore,
};
export { nonUserSpecificFieldsNative };
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 = 85;
+const storeVersion = 86;
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
@@ -722,6 +722,12 @@
state,
ops: {},
}): MigrationFunction<WebNavInfo, AppState>),
+ [86]: (async (state: AppState) => {
+ return {
+ state,
+ ops: {},
+ };
+ }: MigrationFunction<WebNavInfo, AppState>),
};
const persistConfig: PersistConfig = {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 30, 8:36 PM (21 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2602339
Default Alt Text
D14049.diff (2 KB)
Attached To
Mode
D14049: [lib][web][native] Redux store to persist latest backup info
Attached
Detach File
Event Timeline
Log In to Comment