Page MenuHomePhabricator

D5709.id18876.diff
No OneTemporary

D5709.id18876.diff

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

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)

Event Timeline