From 1cfdce0a5c0997bb5516c1477df981c8f0e2aba2 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Fri, 31 Mar 2023 07:33:31 -0300 Subject: [PATCH] revert changes made to in_app_notifications (#7255) --- app/screens/in_app_notification/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/screens/in_app_notification/index.tsx b/app/screens/in_app_notification/index.tsx index d69cb63ef..1e2c2e5c2 100644 --- a/app/screens/in_app_notification/index.tsx +++ b/app/screens/in_app_notification/index.tsx @@ -30,7 +30,6 @@ type InAppNotificationProps = { } const AUTO_DISMISS_TIME_MILLIS = 5000; -const noInsets = {top: 0, bottom: 0, left: 0, right: 0}; const styles = StyleSheet.create({ container: { @@ -70,10 +69,11 @@ const InAppNotification = ({componentId, serverName, serverUrl, notification}: I const dismissTimerRef = useRef(null); const initial = useSharedValue(-130); const isTablet = useIsTablet(); - let insets = useSafeAreaInsets(); - if (Platform.OS === 'android') { + let insets = {top: 0}; + if (Platform.OS === 'ios') { // on Android we disable the safe area provider as it conflicts with the gesture system - insets = noInsets; + // eslint-disable-next-line react-hooks/rules-of-hooks + insets = useSafeAreaInsets(); } const tapped = useRef(false);