Page MenuHomePhorge

D11259.1768878708.diff
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

D11259.1768878708.diff

diff --git a/lib/types/db-ops-types.js b/lib/types/db-ops-types.js
new file mode 100644
--- /dev/null
+++ b/lib/types/db-ops-types.js
@@ -0,0 +1,18 @@
+// @flow
+
+import type { StoreOperations } from './store-ops-types.js';
+
+export type MessageID = string;
+
+type DBOpsEntry =
+ | {
+ +messageID: MessageID,
+ +ops?: ?StoreOperations,
+ }
+ | {
+ +ops: StoreOperations,
+ };
+
+export type DBOpsStore = {
+ +queuedOps: $ReadOnlyArray<DBOpsEntry>,
+};
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
@@ -20,6 +20,7 @@
UpdateUserAvatarResponse,
} from './avatar-types.js';
import type { CommunityStore, AddCommunityPayload } from './community-types.js';
+import type { DBOpsStore } from './db-ops-types.js';
import type {
GetVersionActionPayload,
LastCommunicatedPlatformDetails,
@@ -156,6 +157,7 @@
+globalThemeInfo: GlobalThemeInfo,
+customServer: ?string,
+communityStore: CommunityStore,
+ +dbOpsStore: DBOpsStore,
...
};
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
@@ -84,6 +84,9 @@
communityStore: {
communityInfos: {},
},
+ dbOpsStore: {
+ queuedOps: [],
+ },
};
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
@@ -84,6 +84,9 @@
communityStore: {
communityInfos: {},
},
+ dbOpsStore: {
+ queuedOps: [],
+ },
}: 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
@@ -138,6 +138,7 @@
'frozen',
'threadStore',
'storeLoaded',
+ 'dbOpsStore',
];
function handleReduxMigrationFailure(oldState: AppState): AppState {
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
@@ -4,6 +4,7 @@
import type { PersistState } from 'redux-persist/es/types.js';
import type { CommunityStore } from 'lib/types/community-types.js';
+import type { DBOpsStore } from 'lib/types/db-ops-types';
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';
@@ -77,6 +78,7 @@
+localSettings: LocalSettings,
+integrityStore: IntegrityStore,
+communityStore: CommunityStore,
+ +dbOpsStore: DBOpsStore,
};
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
@@ -80,6 +80,9 @@
communityStore: {
communityInfos: {},
},
+ dbOpsStore: {
+ queuedOps: [],
+ },
});
export { defaultWebState };
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
@@ -27,6 +27,7 @@
identityInvalidSessionDowngrade,
} from 'lib/shared/session-utils.js';
import type { CommunityStore } from 'lib/types/community-types.js';
+import type { DBOpsStore } from 'lib/types/db-ops-types.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';
@@ -117,6 +118,7 @@
+globalThemeInfo: GlobalThemeInfo,
+customServer: ?string,
+communityStore: CommunityStore,
+ +dbOpsStore: DBOpsStore,
};
export type Action =

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 20, 3:11 AM (10 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5959204
Default Alt Text
D11259.1768878708.diff (3 KB)

Event Timeline