Skip to content

Commit

Permalink
[RNMobile] Fix height of the bottom-sheet after using back button (#2…
Browse files Browse the repository at this point in the history
…8632)

* remove unused param and setHeight even if it is the same
  • Loading branch information
dratwas authored Feb 1, 2021
1 parent 15712be commit 05c6700
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function BottomSheetNavigationContainer( { children, animate, main, theme } ) {
};

const setHeight = useCallback(
( height, layout ) => {
( height ) => {
// The screen is fullHeight or changing from fullScreen to the default mode
if (
( typeof currentHeight === 'string' &&
Expand All @@ -93,8 +93,8 @@ function BottomSheetNavigationContainer( { children, animate, main, theme } ) {
return;
}

if ( currentHeight !== height && height > 1 ) {
if ( animate && layout && currentHeight === 1 ) {
if ( height > 1 ) {
if ( currentHeight === 1 ) {
setCurrentHeight( height );
} else if ( animate ) {
performLayoutAnimation( ANIMATION_DURATION );
Expand Down

0 comments on commit 05c6700

Please sign in to comment.