-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56865 from nkdengineer/fix/56796
[CP Staging] fix: FAB is not responsive after exiting create expense flow (cherry picked from commit d2c9a35) (CP triggered by mountiny)
- Loading branch information
Showing
3 changed files
with
105 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {InteractionManager} from 'react-native'; | ||
import Navigation from '@libs/Navigation/Navigation'; | ||
|
||
/** | ||
* On iOS, the navigation transition can sometimes break other animations, such as the closing modal. | ||
* In this case we need to wait for the animation to be complete before executing the navigation | ||
*/ | ||
function navigateAfterInteraction(callback: () => void) { | ||
InteractionManager.runAfterInteractions(() => { | ||
Navigation.setNavigationActionToMicrotaskQueue(callback); | ||
}); | ||
} | ||
|
||
export default navigateAfterInteraction; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function navigateAfterInteraction(callback: () => void) { | ||
callback(); | ||
} | ||
|
||
export default navigateAfterInteraction; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters