···84}
85if (isAndroid) {
86 // iOS is handled by the config plugin -sfn
87- ScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.PORTRAIT_UP)
000088}
8990/**
···84}
85if (isAndroid) {
86 // iOS is handled by the config plugin -sfn
87+ ScreenOrientation.lockAsync(
88+ ScreenOrientation.OrientationLock.PORTRAIT_UP,
89+ ).catch(error =>
90+ logger.debug('Could not lock orientation', {safeMessage: error}),
91+ )
92}
9394/**
+10-4
src/alf/util/systemUI.ts
···1import * as SystemUI from 'expo-system-ui'
2import {type Theme} from '@bsky.app/alf'
304import {isAndroid} from '#/platform/detection'
56export 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')
0000012 }
13 }
14}
···1import * as SystemUI from 'expo-system-ui'
2import {type Theme} from '@bsky.app/alf'
34+import {logger} from '#/logger'
5import {isAndroid} from '#/platform/detection'
67export 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}