Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3724550
D8932.id30304.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D8932.id30304.diff
View Options
diff --git a/keyserver/src/responders/website-responders.js b/keyserver/src/responders/website-responders.js
--- a/keyserver/src/responders/website-responders.js
+++ b/keyserver/src/responders/website-responders.js
@@ -202,23 +202,6 @@
'default notifPermissionAlertInfo',
_isEqual(defaultNotifPermissionAlertInfo),
),
- connection: tShape({
- status: tString('connecting'),
- queuedActivityUpdates: t.irreducible(
- 'default queuedActivityUpdates',
- _isEqual([]),
- ),
- actualizedCalendarQuery: tShape({
- startDate: t.String,
- endDate: t.String,
- filters: t.irreducible(
- 'default filters',
- _isEqual(defaultCalendarFilters),
- ),
- }),
- lateResponses: t.irreducible('default lateResponses', _isEqual([])),
- showDisconnectedBar: tBool(false),
- }),
watchedThreadIDs: t.irreducible('default watchedThreadIDs', _isEqual([])),
lifecycleState: tString('active'),
enabledApps: t.irreducible(
@@ -602,7 +585,6 @@
communityPickerStore: { chat: null, calendar: null },
windowDimensions: { width: 0, height: 0 },
notifPermissionAlertInfo: defaultNotifPermissionAlertInfo,
- connection: connectionPromise,
watchedThreadIDs: [],
lifecycleState: 'active',
enabledApps: defaultWebEnabledApps,
diff --git a/lib/reducers/master-reducer.js b/lib/reducers/master-reducer.js
--- a/lib/reducers/master-reducer.js
+++ b/lib/reducers/master-reducer.js
@@ -1,7 +1,6 @@
// @flow
import reduceCalendarFilters from './calendar-filters-reducer.js';
-import reduceConnectionInfo from './connection-reducer.js';
import reduceDataLoaded from './data-loaded-reducer.js';
import { reduceDeviceToken } from './device-token-reducer.js';
import { reduceDraftStore } from './draft-reducer.js';
@@ -59,8 +58,6 @@
reduceMessageStore(state.messageStore, action, threadInfos);
let messageStore = reducedMessageStore;
- const connection = reduceConnectionInfo(state.connection, action);
-
let keyserverStore = reduceKeyserverStore(state.keyserverStore, action);
if (
@@ -131,7 +128,6 @@
state.notifPermissionAlertInfo,
action,
),
- connection,
lifecycleState: reduceLifecycleState(state.lifecycleState, action),
enabledApps: reduceEnabledApps(state.enabledApps, action),
reportStore,
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
@@ -93,7 +93,6 @@
} from './search-types.js';
import type { SetSessionPayload } from './session-types.js';
import type {
- ConnectionInfo,
StateSyncFullActionPayload,
StateSyncIncrementalActionPayload,
UpdateConnectionStatusPayload,
@@ -127,7 +126,6 @@
+loadingStatuses: { [key: string]: { [idx: number]: LoadingStatus } },
+calendarFilters: $ReadOnlyArray<CalendarFilter>,
+notifPermissionAlertInfo: NotifPermissionAlertInfo,
- +connection: ConnectionInfo,
+watchedThreadIDs: $ReadOnlyArray<string>,
+lifecycleState: LifecycleState,
+enabledApps: EnabledApps,
diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -148,14 +148,14 @@
actualizedCalendarQuery: undefined,
},
}),
- [9]: (state: AppState) => ({
+ [9]: state => ({
...state,
connection: {
...state.connection,
lateResponses: [],
},
}),
- [10]: (state: AppState) => ({
+ [10]: state => ({
...state,
nextLocalID: highestLocalIDSelector(state) + 1,
connection: {
@@ -594,7 +594,7 @@
}
return state;
},
- [43]: async (state: AppState) => {
+ [43]: async state => {
const { messages, drafts, threads, messageStoreThreads } =
await commCoreModule.getClientDBStore();
@@ -699,6 +699,23 @@
},
};
},
+ [48]: async state => {
+ const { connection, keyserverStore, ...rest } = state;
+
+ return {
+ ...rest,
+ keyserverStore: {
+ ...keyserverStore,
+ keyserverInfos: {
+ ...keyserverStore.keyserverInfos,
+ [ashoatKeyserverID]: {
+ ...keyserverStore.keyserverInfos[ashoatKeyserverID],
+ connection,
+ },
+ },
+ },
+ };
+ },
};
// After migration 31, we'll no longer want to persist `messageStore.messages`
@@ -793,7 +810,7 @@
'storeLoaded',
],
debug: __DEV__,
- version: 47,
+ version: 48,
transforms: [messageStoreMessagesBlocklistTransform, reportStoreTransform],
migrate: (createAsyncMigrate(migrations, { debug: __DEV__ }): any),
timeout: ((__DEV__ ? 0 : undefined): number | void),
diff --git a/native/redux/redux-setup.js b/native/redux/redux-setup.js
--- a/native/redux/redux-setup.js
+++ b/native/redux/redux-setup.js
@@ -94,7 +94,6 @@
dataLoaded: false,
customServer: natNodeServer,
notifPermissionAlertInfo: defaultNotifPermissionAlertInfo,
- connection: defaultConnectionInfo(Platform.OS),
watchedThreadIDs: [],
lifecycleState: 'active',
enabledApps: defaultEnabledApps,
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
@@ -15,7 +15,6 @@
import type { MessageStore } from 'lib/types/message-types.js';
import type { UserPolicies } from 'lib/types/policy-types.js';
import type { ReportStore } from 'lib/types/report-types.js';
-import type { ConnectionInfo } from 'lib/types/socket-types.js';
import type { ThreadStore } from 'lib/types/thread-types.js';
import type { CurrentUserInfo, UserStore } from 'lib/types/user-types.js';
import type { NotifPermissionAlertInfo } from 'lib/utils/push-alerts.js';
@@ -41,7 +40,6 @@
+dataLoaded: boolean,
+customServer: ?string,
+notifPermissionAlertInfo: NotifPermissionAlertInfo,
- +connection: ConnectionInfo,
+watchedThreadIDs: $ReadOnlyArray<string>,
+lifecycleState: LifecycleState,
+enabledApps: EnabledApps,
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
@@ -31,7 +31,6 @@
import type { UserPolicies } from 'lib/types/policy-types.js';
import type { BaseAction } from 'lib/types/redux-types.js';
import type { ReportStore } from 'lib/types/report-types.js';
-import type { ConnectionInfo } from 'lib/types/socket-types.js';
import type { ThreadStore } from 'lib/types/thread-types.js';
import type { CurrentUserInfo, UserStore } from 'lib/types/user-types.js';
import { setNewSessionActionType } from 'lib/utils/action-utils.js';
@@ -82,7 +81,6 @@
+windowDimensions: WindowDimensions,
+deviceToken: ?string,
+notifPermissionAlertInfo: NotifPermissionAlertInfo,
- +connection: ConnectionInfo,
+watchedThreadIDs: $ReadOnlyArray<string>,
+lifecycleState: LifecycleState,
+enabledApps: EnabledApps,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 9, 5:43 PM (4 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2835518
Default Alt Text
D8932.id30304.diff (6 KB)
Attached To
Mode
D8932: [keyserver][lib][native][web] Remove connection field from redux
Attached
Detach File
Event Timeline
Log In to Comment