about summary refs log tree commit diff
path: root/src/view
diff options
context:
space:
mode:
authorAnsh <anshnanda10@gmail.com>2023-06-02 13:27:59 -0700
committerGitHub <noreply@github.com>2023-06-02 13:27:59 -0700
commitba4bb46c3fc3d670e565c69bdf71dbb4510b51f0 (patch)
treecb48529f6fcf6553d0b8697aeb66d405d4124166 /src/view
parentad4eaf5ed2e35233ecc7b29ddcafc52c2001dcd1 (diff)
downloadvoidsky-ba4bb46c3fc3d670e565c69bdf71dbb4510b51f0.tar.zst
[APP-107] OTA updates (#587)
* add 1000ms fallbackToCacheTimeout

* add listener via useOTAUpdate hook and show modal if update is available

* finish expo-updates setup

* setup useOTAUpdate hook

* add 1000ms fallbackToCacheTimeout

* add listener via useOTAUpdate hook and show modal if update is available

* finish expo-updates setup

* setup useOTAUpdate hook

* add OTA updates

* Update build.md

* temporarily disable ota updates

* refactor useOTAUpdate code
Diffstat (limited to 'src/view')
-rw-r--r--src/view/screens/Settings.tsx2
-rw-r--r--src/view/shell/index.tsx2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx
index 798893855..52be35a48 100644
--- a/src/view/screens/Settings.tsx
+++ b/src/view/screens/Settings.tsx
@@ -445,7 +445,7 @@ export const SettingsScreen = withAuthRequired(
             </Link>
           ) : null}
           <Text type="sm" style={[styles.buildInfo, pal.textLight]}>
-            Build version {AppInfo.appVersion}
+            Build version {AppInfo.appVersion} {AppInfo.updateChannel}
           </Text>
           <View style={s.footerSpacer} />
         </ScrollView>
diff --git a/src/view/shell/index.tsx b/src/view/shell/index.tsx
index a6066b25f..36f7442dc 100644
--- a/src/view/shell/index.tsx
+++ b/src/view/shell/index.tsx
@@ -18,9 +18,11 @@ import {RoutesContainer, TabsNavigator} from '../../Navigation'
 import {isStateAtTabRoot} from 'lib/routes/helpers'
 import {isAndroid} from 'platform/detection'
 import {SafeAreaProvider} from 'react-native-safe-area-context'
+import {useOTAUpdate} from 'lib/hooks/useOTAUpdate'
 
 const ShellInner = observer(() => {
   const store = useStores()
+  useOTAUpdate() // this hook polls for OTA updates every few seconds
   const winDim = useWindowDimensions()
   const safeAreaInsets = useSafeAreaInsets()
   const containerPadding = React.useMemo(