diff options
author | Eric Bailey <git@esb.lol> | 2024-04-25 10:35:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-25 10:35:21 -0500 |
commit | 6aded4f257fc85c50d57dc6334fa2a896e207aa5 (patch) | |
tree | 801994fe889bbd25a1a80dbb08dbf57e9f07d255 /src/App.native.tsx | |
parent | 5b82b1500720cc959d90471432b84c09d2f86388 (diff) | |
download | voidsky-6aded4f257fc85c50d57dc6334fa2a896e207aa5.tar.zst |
[Session] Base (#3541)
* Add readLastActiveAccount to use accounts[] as source of truth * Add public service constant, use
Diffstat (limited to 'src/App.native.tsx')
-rw-r--r-- | src/App.native.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/App.native.tsx b/src/App.native.tsx index ede587c89..cf96781b7 100644 --- a/src/App.native.tsx +++ b/src/App.native.tsx @@ -16,8 +16,8 @@ import {useQueryClient} from '@tanstack/react-query' import {Provider as StatsigProvider} from '#/lib/statsig/statsig' import {init as initPersistedState} from '#/state/persisted' -import * as persisted from '#/state/persisted' import {Provider as LabelDefsProvider} from '#/state/preferences/label-defs' +import {readLastActiveAccount} from '#/state/session/util/readLastActiveAccount' import {useIntentHandler} from 'lib/hooks/useIntentHandler' import {useNotificationsListener} from 'lib/notifications/notifications' import {QueryProvider} from 'lib/react-query' @@ -64,7 +64,7 @@ function InnerApp() { Toast.show(_(msg`Sorry! Your session expired. Please log in again.`)) }) - const account = persisted.get('session').currentAccount + const account = readLastActiveAccount() resumeSession(account) }, [resumeSession, _]) |