Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Improve splash display on android (#3105)

* Set window background during startup on android

* Set statusbar color to transparent and fine-tune it

authored by

Eiichi Yoshikawa and committed by
GitHub
26fc0cf6 317e0cda

+39 -4
+16 -4
app.config.js
··· 11 11 resizeMode: 'cover', 12 12 } 13 13 14 + const SPLASH_CONFIG_ANDROID = { 15 + backgroundColor: '#0c7cff', 16 + image: './assets/splash.png', 17 + resizeMode: 'cover', 18 + } 19 + const DARK_SPLASH_CONFIG_ANDROID = { 20 + backgroundColor: '#0f141b', 21 + image: './assets/splash-dark.png', 22 + resizeMode: 'cover', 23 + } 24 + 14 25 module.exports = function (config) { 15 26 /** 16 27 * App version number. Should be incremented as part of a release cycle. ··· 70 81 }, 71 82 }, 72 83 androidStatusBar: { 73 - barStyle: 'dark-content', 74 - backgroundColor: '#ffffff', 84 + barStyle: 'light-content', 85 + backgroundColor: '#00000000', 75 86 }, 76 87 android: { 77 88 icon: './assets/icon.png', ··· 101 112 }, 102 113 ], 103 114 splash: { 104 - ...SPLASH_CONFIG, 105 - dark: DARK_SPLASH_CONFIG, 115 + ...SPLASH_CONFIG_ANDROID, 116 + dark: DARK_SPLASH_CONFIG_ANDROID, 106 117 }, 107 118 }, 108 119 web: { ··· 146 157 }, 147 158 ], 148 159 './plugins/withAndroidManifestPlugin.js', 160 + './plugins/withAndroidStylesWindowBackgroundPlugin.js', 149 161 './plugins/shareExtension/withShareExtensions.js', 150 162 ].filter(Boolean), 151 163 extra: {
+20
plugins/withAndroidStylesWindowBackgroundPlugin.js
··· 1 + const {withAndroidStyles, AndroidConfig} = require('@expo/config-plugins') 2 + 3 + module.exports = function withAndroidStylesWindowBackgroundPlugin(appConfig) { 4 + return withAndroidStyles(appConfig, function (decoratedAppConfig) { 5 + try { 6 + decoratedAppConfig.modResults = AndroidConfig.Styles.assignStylesValue( 7 + decoratedAppConfig.modResults, 8 + { 9 + add: true, 10 + parent: AndroidConfig.Styles.getAppThemeLightNoActionBarGroup(), 11 + name: 'android:windowBackground', 12 + value: '@drawable/splashscreen', 13 + }, 14 + ) 15 + } catch (e) { 16 + console.error(`withAndroidStylesWindowBackgroundPlugin failed`, e) 17 + } 18 + return decoratedAppConfig 19 + }) 20 + }
+3
src/App.native.tsx
··· 46 46 import {msg} from '@lingui/macro' 47 47 import {useLingui} from '@lingui/react' 48 48 import {useIntentHandler} from 'lib/hooks/useIntentHandler' 49 + import {StatusBar} from 'expo-status-bar' 50 + import {isAndroid} from 'platform/detection' 49 51 50 52 SplashScreen.preventAutoHideAsync() 51 53 ··· 69 71 70 72 return ( 71 73 <SafeAreaProvider initialMetrics={initialWindowMetrics}> 74 + {isAndroid && <StatusBar />} 72 75 <Alf theme={theme}> 73 76 <Splash isReady={!isInitialLoad}> 74 77 <React.Fragment