Page MenuHomePhabricator

D12936.diff
No OneTemporary

D12936.diff

diff --git a/lib/types/dm-ops.js b/lib/types/dm-ops.js
--- a/lib/types/dm-ops.js
+++ b/lib/types/dm-ops.js
@@ -314,3 +314,9 @@
+dmOpID: string,
+messages: $ReadOnlyArray<OutboundP2PMessage>,
};
+
+export type QueuedDMOperations = {
+ +operations: {
+ +[threadID: string]: $ReadOnlyArray<DMOperation>,
+ },
+};
diff --git a/lib/types/redux-types.js b/lib/types/redux-types.js
--- a/lib/types/redux-types.js
+++ b/lib/types/redux-types.js
@@ -43,6 +43,7 @@
import type {
ScheduleP2PMessagesPayload,
ProcessDMOpsPayload,
+ QueuedDMOperations,
} from './dm-ops.js';
import type { DraftStore } from './draft-types.js';
import type { EnabledApps, SupportedApps } from './enabled-apps.js';
@@ -194,6 +195,7 @@
+auxUserStore: AuxUserStore,
+tunnelbrokerDeviceToken: TunnelbrokerDeviceToken,
+_persist: ?PersistState,
+ +queuedDMOperations: QueuedDMOperations,
...
};
diff --git a/lib/utils/reducers-utils.test.js b/lib/utils/reducers-utils.test.js
--- a/lib/utils/reducers-utils.test.js
+++ b/lib/utils/reducers-utils.test.js
@@ -98,6 +98,9 @@
localToken: null,
tunnelbrokerToken: null,
},
+ queuedDMOperations: {
+ operations: {},
+ },
};
state = {
...defaultState,
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
@@ -98,6 +98,9 @@
localToken: null,
tunnelbrokerToken: null,
},
+ queuedDMOperations: {
+ operations: {},
+ },
}: 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
@@ -1450,6 +1450,15 @@
ops: dbOperations,
};
},
+ [81]: (state: AppState) => ({
+ state: {
+ ...state,
+ queuedDMOperations: {
+ operations: {},
+ },
+ },
+ ops: [],
+ }),
};
// NOTE: renaming this object, and especially the `version` property
@@ -1460,7 +1469,7 @@
storage: AsyncStorage,
blacklist: persistBlacklist,
debug: __DEV__,
- version: 80,
+ version: 81,
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
@@ -7,6 +7,7 @@
import type { AuxUserStore } from 'lib/types/aux-user-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';
import type { DraftStore } from 'lib/types/draft-types.js';
import type { EnabledApps } from 'lib/types/enabled-apps.js';
import type { EntryStore } from 'lib/types/entry-types.js';
@@ -84,6 +85,7 @@
+syncedMetadataStore: SyncedMetadataStore,
+auxUserStore: AuxUserStore,
+tunnelbrokerDeviceToken: TunnelbrokerDeviceToken,
+ +queuedDMOperations: QueuedDMOperations,
};
export { nonUserSpecificFieldsNative };
diff --git a/web/redux/default-state.js b/web/redux/default-state.js
--- a/web/redux/default-state.js
+++ b/web/redux/default-state.js
@@ -94,6 +94,9 @@
localToken: null,
tunnelbrokerToken: null,
},
+ queuedDMOperations: {
+ operations: {},
+ },
});
export { defaultWebState };
diff --git a/web/redux/handle-redux-migration-failure.js b/web/redux/handle-redux-migration-failure.js
--- a/web/redux/handle-redux-migration-failure.js
+++ b/web/redux/handle-redux-migration-failure.js
@@ -15,6 +15,7 @@
'customServer',
'messageStore',
'tunnelbrokerDeviceToken',
+ 'queuedDMOperations',
];
function handleReduxMigrationFailure(oldState: AppState): AppState {
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 = 79;
+const storeVersion = 81;
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
@@ -611,6 +611,15 @@
ops: [],
};
},
+ [81]: (state: AppState) => ({
+ state: {
+ ...state,
+ queuedDMOperations: {
+ operations: {},
+ },
+ },
+ ops: [],
+ }),
};
const persistConfig: PersistConfig = {
diff --git a/web/redux/redux-setup.js b/web/redux/redux-setup.js
--- a/web/redux/redux-setup.js
+++ b/web/redux/redux-setup.js
@@ -41,6 +41,7 @@
MessageSourceMetadata,
DBOpsStore,
} from 'lib/types/db-ops-types.js';
+import type { QueuedDMOperations } from 'lib/types/dm-ops.js';
import type { DraftStore } from 'lib/types/draft-types.js';
import type { EnabledApps } from 'lib/types/enabled-apps.js';
import type { EntryStore } from 'lib/types/entry-types.js';
@@ -133,6 +134,7 @@
+syncedMetadataStore: SyncedMetadataStore,
+auxUserStore: AuxUserStore,
+tunnelbrokerDeviceToken: TunnelbrokerDeviceToken,
+ +queuedDMOperations: QueuedDMOperations,
};
export type Action = $ReadOnly<

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 10:52 AM (21 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2584324
Default Alt Text
D12936.diff (5 KB)

Event Timeline