-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 #3214 from Expensify/cherry-pick-staging-3208
- Loading branch information
Showing
14 changed files
with
354 additions
and
228 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
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
18 changes: 11 additions & 7 deletions
18
src/libs/Navigation/AppNavigator/modalCardStyleInterpolator.js
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
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
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,19 @@ | ||
/** | ||
* Navigation's transitionEnd is not reliable on IOS thus we use InteractonManager | ||
* Some information https://github.com/software-mansion/react-native-screens/issues/713 | ||
*/ | ||
import {InteractionManager} from 'react-native'; | ||
|
||
/** | ||
* Call the callback after screen transiton has ended | ||
* | ||
* @param {Object} navigation Screen navigation prop | ||
* @param {Function} callback Method to call | ||
* @returns {Function} | ||
*/ | ||
function onScreenTransitionEnd(navigation, callback) { | ||
const handle = InteractionManager.runAfterInteractions(callback); | ||
return () => handle.cancel(); | ||
} | ||
|
||
export default onScreenTransitionEnd; |
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 Str from 'expensify-common/lib/str'; | ||
|
||
/** | ||
* Call the callback after screen transiton has ended | ||
* | ||
* @param {Object} navigation Screen navigation prop | ||
* @param {Function} callback Method to call | ||
* @returns {Function} | ||
*/ | ||
function onScreenTransitionEnd(navigation, callback) { | ||
return navigation.addListener('transitionEnd', evt => Str.result(callback, evt)); | ||
} | ||
|
||
export default onScreenTransitionEnd; |
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
Oops, something went wrong.