Skip to content

Commit

Permalink
fix: updated BottomSheetContainer measuring on android
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhom committed Jun 2, 2021
1 parent dd9dbdc commit d0e5227
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/bottomSheetContainer/BottomSheetContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { memo, useCallback, useMemo, useRef } from 'react';
import { LayoutChangeEvent, View, StatusBar } from 'react-native';
import { LayoutChangeEvent, View } from 'react-native';
import { WINDOW_HEIGHT } from '../../constants';
import { print } from '../../utilities';
import { styles } from './styles';
Expand Down Expand Up @@ -44,8 +44,7 @@ function BottomSheetContainerComponent({
top: pageY,
left: 0,
right: 0,
bottom:
WINDOW_HEIGHT - (pageY + height + (StatusBar.currentHeight ?? 0)),
bottom: Math.max(0, WINDOW_HEIGHT - (pageY + height)),
};
}
);
Expand Down

0 comments on commit d0e5227

Please sign in to comment.