+5
-1
src/App.native.tsx
+5
-1
src/App.native.tsx
+10
-4
src/alf/util/systemUI.ts
+10
-4
src/alf/util/systemUI.ts
···
1
import * as SystemUI from 'expo-system-ui'
2
import {type Theme} from '@bsky.app/alf'
3
4
import {isAndroid} from '#/platform/detection'
5
6
export function setSystemUITheme(themeType: 'theme' | 'lightbox', t: Theme) {
7
if (isAndroid) {
8
-
if (themeType === 'theme') {
9
-
SystemUI.setBackgroundColorAsync(t.atoms.bg.backgroundColor)
10
-
} else {
11
-
SystemUI.setBackgroundColorAsync('black')
12
}
13
}
14
}
···
1
import * as SystemUI from 'expo-system-ui'
2
import {type Theme} from '@bsky.app/alf'
3
4
+
import {logger} from '#/logger'
5
import {isAndroid} from '#/platform/detection'
6
7
export function setSystemUITheme(themeType: 'theme' | 'lightbox', t: Theme) {
8
if (isAndroid) {
9
+
try {
10
+
if (themeType === 'theme') {
11
+
SystemUI.setBackgroundColorAsync(t.atoms.bg.backgroundColor)
12
+
} else {
13
+
SystemUI.setBackgroundColorAsync('black')
14
+
}
15
+
} catch (error) {
16
+
// Can reject with 'The current activity is no longer available' - no big deal
17
+
logger.debug('Could not set system UI theme', {safeMessage: error})
18
}
19
}
20
}