diff options
Diffstat (limited to 'src/Splash.tsx')
-rw-r--r-- | src/Splash.tsx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Splash.tsx b/src/Splash.tsx index 80d0a66e7..42a21c083 100644 --- a/src/Splash.tsx +++ b/src/Splash.tsx @@ -21,7 +21,6 @@ import {useSafeAreaInsets} from 'react-native-safe-area-context' import Svg, {Path, SvgProps} from 'react-native-svg' import {isAndroid} from '#/platform/detection' -import {useThemePrefs} from 'state/shell' import {Logotype} from '#/view/icons/Logotype' // @ts-ignore @@ -75,10 +74,8 @@ export function Splash(props: React.PropsWithChildren<Props>) { isLayoutReady && reduceMotion !== undefined - const {colorMode} = useThemePrefs() const colorScheme = useColorScheme() - const themeName = colorMode === 'system' ? colorScheme : colorMode - const isDarkMode = themeName === 'dark' + const isDarkMode = colorScheme === 'dark' const logoAnimation = useAnimatedStyle(() => { return { @@ -184,6 +181,8 @@ export function Splash(props: React.PropsWithChildren<Props>) { const logoAnimations = reduceMotion === true ? reducedLogoAnimation : logoAnimation + // special off-spec color for dark mode + const logoBg = isDarkMode ? '#0F1824' : '#fff' return ( <View style={{flex: 1}} onLayout={onLayout}> @@ -235,7 +234,7 @@ export function Splash(props: React.PropsWithChildren<Props>) { }, ]}> <AnimatedLogo - fill="#fff" + fill={logoBg} style={[{opacity: 0}, logoAnimations]} /> </Animated.View> @@ -256,14 +255,16 @@ export function Splash(props: React.PropsWithChildren<Props>) { transform: [{translateY: -(insets.top / 2)}, {scale: 0.1}], // scale from 1000px to 100px }, ]}> - <AnimatedLogo fill="#fff" style={[logoAnimations]} /> + <AnimatedLogo fill={logoBg} style={[logoAnimations]} /> </Animated.View> }> {!isAnimationComplete && ( <View style={[ StyleSheet.absoluteFillObject, - {backgroundColor: '#fff'}, + { + backgroundColor: logoBg, + }, ]} /> )} |