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 @@ -27,6 +27,21 @@ import type { ConnectivityInfo } from '../types/connectivity.js'; import type { LocalSettings } from '../types/local-settings-types.js'; +const nonUserSpecificFieldsNative = [ + 'storeLoaded', + 'loadingStatuses', + 'customServer', + 'lifecycleState', + 'nextLocalID', + 'dimensions', + 'connectivity', + 'deviceCameraInfo', + 'deviceOrientation', + 'frozen', + 'keyserverStore', + '_persist', +]; + export type AppState = { +navInfo: NavInfo, +currentUserInfo: ?CurrentUserInfo, @@ -62,3 +77,5 @@ +localSettings: LocalSettings, +integrityStore: IntegrityStore, }; + +export { nonUserSpecificFieldsNative }; 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 @@ -63,6 +63,19 @@ +calendar: ?string, }; +const nonUserSpecificFieldsWeb = [ + 'loadingStatuses', + 'windowDimensions', + 'lifecycleState', + 'nextLocalID', + 'windowActive', + 'pushApiPublicKey', + 'keyserverStore', + 'initialStateLoaded', + '_persist', + 'customServer', +]; + export type AppState = { +navInfo: NavInfo, +currentUserInfo: ?CurrentUserInfo, @@ -112,7 +125,7 @@ | { +type: 'SET_CRYPTO_STORE', payload: CryptoStore } | { +type: 'SET_INITIAL_REDUX_STATE', payload: InitialReduxState }; -export function reducer(oldState: AppState | void, action: Action): AppState { +function reducer(oldState: AppState | void, action: Action): AppState { invariant(oldState, 'should be set'); let state = oldState; let storeOperations: StoreOperations = { @@ -395,3 +408,5 @@ return state; } + +export { nonUserSpecificFieldsWeb, reducer };