Bluesky app fork with some witchin' additions 💫

don't send some "activity no longer available" errors (#9100)

authored by samuel.fm and committed by GitHub ae2c9a83 02a25d2a

Changed files
+15 -5
src
+5 -1
src/App.native.tsx
··· 84 84 } 85 85 if (isAndroid) { 86 86 // iOS is handled by the config plugin -sfn 87 - ScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.PORTRAIT_UP) 87 + ScreenOrientation.lockAsync( 88 + ScreenOrientation.OrientationLock.PORTRAIT_UP, 89 + ).catch(error => 90 + logger.debug('Could not lock orientation', {safeMessage: error}), 91 + ) 88 92 } 89 93 90 94 /**
+10 -4
src/alf/util/systemUI.ts
··· 1 1 import * as SystemUI from 'expo-system-ui' 2 2 import {type Theme} from '@bsky.app/alf' 3 3 4 + import {logger} from '#/logger' 4 5 import {isAndroid} from '#/platform/detection' 5 6 6 7 export function setSystemUITheme(themeType: 'theme' | 'lightbox', t: Theme) { 7 8 if (isAndroid) { 8 - if (themeType === 'theme') { 9 - SystemUI.setBackgroundColorAsync(t.atoms.bg.backgroundColor) 10 - } else { 11 - SystemUI.setBackgroundColorAsync('black') 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}) 12 18 } 13 19 } 14 20 }