about summary refs log tree commit diff
path: root/src/view/com/auth/withAuthRequired.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-03-15 15:05:13 -0500
committerGitHub <noreply@github.com>2023-03-15 15:05:13 -0500
commit3c05a08482cbcff452ece8c11ff3a2a740c79503 (patch)
treeda6458cb8238b1537372c66ffb63d46d9f2ecae6 /src/view/com/auth/withAuthRequired.tsx
parent94741cddedaa9c923f37b7cc11d5a2cbab81ca44 (diff)
downloadvoidsky-3c05a08482cbcff452ece8c11ff3a2a740c79503.tar.zst
Logout bug hunt (#294)
* Stop storing the log on disk

* Add more info to the session logging

* Only clear session tokens from storage when they've expired

* Retry session resumption a few times if it's a network issue

* Improvements to the 'connecting' screen
Diffstat (limited to 'src/view/com/auth/withAuthRequired.tsx')
-rw-r--r--src/view/com/auth/withAuthRequired.tsx11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/view/com/auth/withAuthRequired.tsx b/src/view/com/auth/withAuthRequired.tsx
index 11b67f383..6073a4f80 100644
--- a/src/view/com/auth/withAuthRequired.tsx
+++ b/src/view/com/auth/withAuthRequired.tsx
@@ -22,11 +22,20 @@ export const withAuthRequired = <P extends object>(
 
 function Loading() {
   const pal = usePalette('default')
+
+  const [isTakingTooLong, setIsTakingTooLong] = React.useState(false)
+  React.useEffect(() => {
+    const t = setTimeout(() => setIsTakingTooLong(true), 15e3)
+    return () => clearTimeout(t)
+  }, [setIsTakingTooLong])
+
   return (
     <View style={[styles.loading, pal.view]}>
       <ActivityIndicator size="large" />
       <Text type="2xl" style={[styles.loadingText, pal.textLight]}>
-        Firing up the grill...
+        {isTakingTooLong
+          ? "This is taking too long. There may be a problem with your internet or with the service, but we're going to try a couple more times..."
+          : 'Connecting...'}
       </Text>
     </View>
   )