From 87245480d42f0956b06987944ca412538d4fb698 Mon Sep 17 00:00:00 2001
From: Hailey <me@haileyok.com>
Date: Sun, 31 Dec 2023 16:05:07 -0800
Subject: who the hell knows

---
 src/Splash.tsx | 72 ++++++++++++++++++++++++++++++++++++----------------------
 1 file changed, 45 insertions(+), 27 deletions(-)

(limited to 'src/Splash.tsx')

diff --git a/src/Splash.tsx b/src/Splash.tsx
index fc70bb3b7..0f4c83616 100644
--- a/src/Splash.tsx
+++ b/src/Splash.tsx
@@ -2,6 +2,7 @@ import React, {useCallback, useEffect} from 'react'
 import {View, StyleSheet, Image as RNImage} from 'react-native'
 import * as SplashScreen from 'expo-splash-screen'
 import {Image} from 'expo-image'
+import {platformApiLevel} from 'expo-device'
 import Animated, {
   interpolate,
   runOnJS,
@@ -136,34 +137,51 @@ export function Splash(props: React.PropsWithChildren<Props>) {
         />
       )}
 
-      <MaskedView
-        style={[StyleSheet.absoluteFillObject]}
-        maskElement={
-          <Animated.View
-            style={[
-              StyleSheet.absoluteFillObject,
-              {
-                // Transparent background because mask is based off alpha channel.
-                backgroundColor: 'transparent',
-                flex: 1,
-                justifyContent: 'center',
-                alignItems: 'center',
-                transform: [{translateY: -(insets.top / 2)}, {scale: 0.1}], // scale from 1000px to 100px
-              },
-            ]}>
-            <AnimatedLogo style={[logoAnimations]} />
+      {platformApiLevel && platformApiLevel <= 27 ? (
+        <>
+          {!isAnimationComplete && (
+            <View
+              style={[
+                StyleSheet.absoluteFillObject,
+                {backgroundColor: 'white'},
+              ]}
+            />
+          )}
+          <Animated.View style={[{flex: 1}, appAnimation]}>
+            {props.children}
           </Animated.View>
-        }>
-        {!isAnimationComplete && (
-          <View
-            style={[StyleSheet.absoluteFillObject, {backgroundColor: 'white'}]}
-          />
-        )}
-
-        <Animated.View style={[{flex: 1}, appAnimation]}>
-          {props.children}
-        </Animated.View>
-      </MaskedView>
+        </>
+      ) : (
+        <MaskedView
+          style={[StyleSheet.absoluteFillObject]}
+          maskElement={
+            <Animated.View
+              style={[
+                {
+                  // Transparent background because mask is based off alpha channel.
+                  backgroundColor: 'transparent',
+                  flex: 1,
+                  justifyContent: 'center',
+                  alignItems: 'center',
+                  transform: [{translateY: -(insets.top / 2)}, {scale: 0.1}], // scale from 1000px to 100px
+                },
+              ]}>
+              <AnimatedLogo style={[logoAnimations]} />
+            </Animated.View>
+          }>
+          {!isAnimationComplete && (
+            <View
+              style={[
+                StyleSheet.absoluteFillObject,
+                {backgroundColor: 'white'},
+              ]}
+            />
+          )}
+          <Animated.View style={[{flex: 1}, appAnimation]}>
+            {props.children}
+          </Animated.View>
+        </MaskedView>
+      )}
     </View>
   )
 }
-- 
cgit 1.4.1

