revert changes made to in_app_notifications (#7255)

This commit is contained in:
Elias Nahum 2023-03-31 07:33:31 -03:00
parent 0f8f927f26
commit 1cfdce0a5c
No known key found for this signature in database
GPG key ID: A2EB45B81EA1AB32

View file

@ -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<NodeJS.Timeout | null>(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<boolean>(false);