Skip to content
This repository was archived by the owner on Feb 8, 2025. It is now read-only.

Commit 8aa6592

Browse files
committed
feat(app): check whether updates are enabled more generically
1 parent 3ac7905 commit 8aa6592

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/components/provider/UpdateProvider.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as Updates from 'expo-updates';
22
import { useEffect } from 'react';
3-
import { AppState, Platform } from 'react-native';
3+
import { AppState } from 'react-native';
44
import * as Sentry from '@sentry/react-native';
55
import { showInfo, showWarning } from '#/Snackbar';
66

@@ -21,7 +21,7 @@ export function UpdateProvider() {
2121
// - when app enters foreground
2222
// - every 5 minutes
2323
useEffect(() => {
24-
if (__DEV__ || Platform.OS === 'web') return;
24+
if (!Updates.isEnabled) return;
2525

2626
const checkStale = () =>
2727
!lastCheckForUpdateTimeSinceRestart ||

0 commit comments

Comments
 (0)