From 2f10be2cfe0567516e6df06b0ca6429726a3e858 Mon Sep 17 00:00:00 2001 From: Hailey Date: Mon, 2 Dec 2024 16:16:39 -0800 Subject: remove masked view dependency (#6886) --- src/Splash.tsx | 85 +++++++++++++++------------------------------------------- 1 file changed, 22 insertions(+), 63 deletions(-) (limited to 'src/Splash.tsx') diff --git a/src/Splash.tsx b/src/Splash.tsx index a52b8837d..c31723aaa 100644 --- a/src/Splash.tsx +++ b/src/Splash.tsx @@ -18,9 +18,7 @@ import {useSafeAreaInsets} from 'react-native-safe-area-context' import Svg, {Path, SvgProps} from 'react-native-svg' import {Image} from 'expo-image' import * as SplashScreen from 'expo-splash-screen' -import MaskedView from '@react-native-masked-view/masked-view' -import {isAndroid} from '#/platform/detection' import {Logotype} from '#/view/icons/Logotype' // @ts-ignore import splashImagePointer from '../assets/splash.png' @@ -53,8 +51,6 @@ type Props = { isReady: boolean } -const AnimatedLogo = Animated.createAnimatedComponent(Logo) - export function Splash(props: React.PropsWithChildren) { 'use no memo' const insets = useSafeAreaInsets() @@ -152,8 +148,6 @@ export function Splash(props: React.PropsWithChildren) { {duration: 400, easing: Easing.out(Easing.cubic)}, async () => { // set these values to check animation at specific point - // outroLogo.set(0.1) - // outroApp.set(0.1) outroLogo.set(() => withTiming( 1, @@ -221,66 +215,31 @@ export function Splash(props: React.PropsWithChildren) { )} - {isReady && - (isAndroid || reduceMotion === true ? ( - // Use a simple fade on older versions of android (work around a bug) - <> - - {props.children} - + {isReady && ( + <> + + {props.children} + - {!isAnimationComplete && ( - - + {!isAnimationComplete && ( + + + - )} - - ) : ( - - - - }> - {!isAnimationComplete && ( - - )} - - {props.children} - - ))} + )} + + )} ) } -- cgit 1.4.1