Skip to content

Commit

Permalink
No need to call Navigate.navigate
Browse files Browse the repository at this point in the history
  • Loading branch information
aldo-expensify committed Mar 8, 2023
1 parent fb20144 commit 4237497
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,12 @@ class ContactMethodDetailsPage extends Component {
confirmDeleteAndHideModal() {
const contactMethod = this.getContactMethod();
User.deleteContactMethod(contactMethod);

// We only need to close the modal, calling Navigation.navigate(ROUTES.SETTINGS_CONTACT_METHODS)
// is not necessary because we will get navigate automatically when the contact method is removed from Onyx.
// Using Navigation.navigate cause the Navigation.isNavigating to get stuck with a true value blocking further
// navigations.
this.toggleDeleteModal(false);
Navigation.navigate(ROUTES.SETTINGS_CONTACT_METHODS);
}

/**
Expand Down

0 comments on commit 4237497

Please sign in to comment.