Skip to content

Commit

Permalink
fix: modals not opening on ios bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kalashshah committed Feb 20, 2024
1 parent fd1cc13 commit f296019
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ios/epns.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@
CODE_SIGN_ENTITLEMENTS = epns/epns.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 102;
CURRENT_PROJECT_VERSION = 103;
DEVELOPMENT_TEAM = 62B7287GF5;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "push.prod-Info.plist";
Expand Down Expand Up @@ -1179,7 +1179,7 @@
CODE_SIGN_ENTITLEMENTS = epns/epns.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 102;
CURRENT_PROJECT_VERSION = 103;
DEVELOPMENT_TEAM = 62B7287GF5;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "push.prod-Info.plist";
Expand Down
9 changes: 6 additions & 3 deletions src/hooks/ui/useModalBlur.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {BlurView} from 'expo-blur';
import React from 'react';
import {StyleSheet, View} from 'react-native';
import {InteractionManager, StyleSheet, View} from 'react-native';
import Modal from 'react-native-modal';

interface ModalType {
Expand All @@ -11,8 +11,11 @@ interface ModalType {
const useModalBlur = () => {
const [open, setOpen] = React.useState(false);

const handleOpen = () => {
setOpen(true);
const handleOpen = async () => {
// Fix for iOS modal not opening bug
await InteractionManager.runAfterInteractions(() => {
setOpen(true);
});
};

const handleClose = () => {
Expand Down

0 comments on commit f296019

Please sign in to comment.