Changeset View
Changeset View
Standalone View
Standalone View
native/redux/redux-setup.js
Show All 14 Lines | |||||
} from 'lib/actions/user-actions'; | } from 'lib/actions/user-actions'; | ||||
import baseReducer from 'lib/reducers/master-reducer'; | import baseReducer from 'lib/reducers/master-reducer'; | ||||
import { processThreadStoreOperations } from 'lib/reducers/thread-reducer'; | import { processThreadStoreOperations } from 'lib/reducers/thread-reducer'; | ||||
import { | import { | ||||
invalidSessionDowngrade, | invalidSessionDowngrade, | ||||
invalidSessionRecovery, | invalidSessionRecovery, | ||||
} from 'lib/shared/account-utils'; | } from 'lib/shared/account-utils'; | ||||
import { isStaff } from 'lib/shared/user-utils'; | import { isStaff } from 'lib/shared/user-utils'; | ||||
import { logInActionSources } from 'lib/types/account-types'; | |||||
import { defaultEnabledApps } from 'lib/types/enabled-apps'; | import { defaultEnabledApps } from 'lib/types/enabled-apps'; | ||||
import { defaultCalendarFilters } from 'lib/types/filter-types'; | import { defaultCalendarFilters } from 'lib/types/filter-types'; | ||||
import type { Dispatch, BaseAction } from 'lib/types/redux-types'; | import type { Dispatch, BaseAction } from 'lib/types/redux-types'; | ||||
import { rehydrateActionType } from 'lib/types/redux-types'; | import { rehydrateActionType } from 'lib/types/redux-types'; | ||||
import type { SetSessionPayload } from 'lib/types/session-types'; | import type { SetSessionPayload } from 'lib/types/session-types'; | ||||
import { | import { | ||||
defaultConnectionInfo, | defaultConnectionInfo, | ||||
incrementalStateSyncActionType, | incrementalStateSyncActionType, | ||||
▲ Show 20 Lines • Show All 350 Lines • ▼ Show 20 Lines | try { | ||||
), | ), | ||||
); | ); | ||||
} | } | ||||
await Promise.all(promises); | await Promise.all(promises); | ||||
} catch (e) { | } catch (e) { | ||||
if (isTaskCancelledError(e)) { | if (isTaskCancelledError(e)) { | ||||
return; | return; | ||||
} | } | ||||
dispatch({ | |||||
type: setNewSessionActionType, | |||||
payload: { | |||||
sessionChange: { | |||||
cookie: null, | |||||
cookieInvalidated: false, | |||||
currentUserInfo: state.currentUserInfo, | |||||
}, | |||||
preRequestUserState: { | |||||
currentUserInfo: state.currentUserInfo, | |||||
sessionID: undefined, | |||||
cookie: state.cookie, | |||||
}, | |||||
error: null, | |||||
logInActionSource: logInActionSources.sqliteOpFailure, | |||||
}, | |||||
}); | |||||
await persistor.flush(); | |||||
ExitApp.exitApp(); | ExitApp.exitApp(); | ||||
} | } | ||||
})(); | })(); | ||||
return state; | return state; | ||||
} | } | ||||
function sessionInvalidationAlert(payload: SetSessionPayload) { | function sessionInvalidationAlert(payload: SetSessionPayload) { | ||||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |