From 14c994c7baeb8505b41c185ff7f0ab7e37ad7c92 Mon Sep 17 00:00:00 2001
From: Lim Chee Aun <cheeaun@gmail.com>
Date: Fri, 10 Feb 2023 11:35:06 +0800
Subject: [PATCH] Fix this deja vu bug, Flash of Welcome Page (FOWP)

---
 src/app.jsx | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/app.jsx b/src/app.jsx
index b4185f8f..01cd61e0 100644
--- a/src/app.jsx
+++ b/src/app.jsx
@@ -109,9 +109,15 @@ function App() {
         store.session.set('currentAccount', account.info.id);
         const { masto } = api({ account });
         initPreferences(masto);
+        setUIState('loading');
         (async () => {
-          await initInstance(masto);
-          setIsLoggedIn(true);
+          try {
+            await initInstance(masto);
+          } catch (e) {
+          } finally {
+            setIsLoggedIn(true);
+            setUIState('default');
+          }
         })();
       }