about summary refs log tree commit diff
path: root/src/App.native.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/App.native.tsx')
-rw-r--r--src/App.native.tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/App.native.tsx b/src/App.native.tsx
index a3b24f440..79104f17c 100644
--- a/src/App.native.tsx
+++ b/src/App.native.tsx
@@ -57,7 +57,7 @@ SplashScreen.preventAutoHideAsync()
 function InnerApp() {
   const [isReady, setIsReady] = React.useState(false)
   const {currentAccount} = useSession()
-  const {initSession} = useSessionApi()
+  const {resumeSession} = useSessionApi()
   const theme = useColorModeTheme()
   const {_} = useLingui()
 
@@ -65,20 +65,20 @@ function InnerApp() {
 
   // init
   useEffect(() => {
-    async function resumeSession(account?: SessionAccount) {
+    async function onLaunch(account?: SessionAccount) {
       try {
         if (account) {
-          await initSession(account)
+          await resumeSession(account)
         }
       } catch (e) {
-        logger.error(`session: resumeSession failed`, {message: e})
+        logger.error(`session: resume failed`, {message: e})
       } finally {
         setIsReady(true)
       }
     }
     const account = readLastActiveAccount()
-    resumeSession(account)
-  }, [initSession])
+    onLaunch(account)
+  }, [resumeSession])
 
   useEffect(() => {
     return listenSessionDropped(() => {