Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3361287
D5709.id18876.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
D5709.id18876.diff
View Options
diff --git a/native/redux/action-types.js b/native/redux/action-types.js
--- a/native/redux/action-types.js
+++ b/native/redux/action-types.js
@@ -29,6 +29,7 @@
export const updateDeviceOrientationActionType = 'UPDATE_DEVICE_ORIENTATION';
export const updateThreadLastNavigatedActionType =
'UPDATE_THREAD_LAST_NAVIGATED';
+export const setStoreLoadedActionType = 'SET_STORE_LOADED';
export const setReduxStateActionType = 'SET_REDUX_STATE';
export const backgroundActionTypes: Set<string> = new Set([
@@ -76,4 +77,7 @@
| {
+type: 'UPDATE_THREAD_LAST_NAVIGATED',
+payload: { +threadID: string, +time: number },
+ }
+ | {
+ +type: 'SET_STORE_LOADED',
};
diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -489,6 +489,7 @@
'deviceOrientation',
'frozen',
'threadStore',
+ 'storeLoaded',
],
debug: __DEV__,
version: 31,
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
@@ -68,6 +68,7 @@
updateThreadLastNavigatedActionType,
backgroundActionTypes,
setReduxStateActionType,
+ setStoreLoadedActionType,
type Action,
} from './action-types';
import { remoteReduxDevServerConfig } from './dev-tools';
@@ -97,6 +98,7 @@
local: {},
currentAsOf: 0,
},
+ storeLoaded: false,
updatesCurrentAsOf: 0,
loadingStatuses: {},
calendarFilters: defaultCalendarFilters,
@@ -344,6 +346,12 @@
};
}
}
+ if (action.type === setStoreLoadedActionType) {
+ return {
+ ...state,
+ storeLoaded: true,
+ };
+ }
const baseReducerResult = baseReducer(state, (action: BaseAction));
state = baseReducerResult.state;
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
@@ -30,6 +30,7 @@
threadStore: ThreadStore,
userStore: UserStore,
messageStore: MessageStore,
+ storeLoaded: boolean,
updatesCurrentAsOf: number,
loadingStatuses: { [key: string]: { [idx: number]: LoadingStatus } },
calendarFilters: $ReadOnlyArray<CalendarFilter>,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 4:19 PM (20 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2580411
Default Alt Text
D5709.id18876.diff (2 KB)
Attached To
Mode
D5709: Move Store Loaded to redux
Attached
Detach File
Event Timeline
Log In to Comment