make scrollview automatically adapt to footer height
This commit is contained in:
@@ -60,7 +60,7 @@ export function BottomBar({navigation}: BottomTabBarProps) {
|
||||
const pal = usePalette('default')
|
||||
const {_} = useLingui()
|
||||
const safeAreaInsets = useSafeAreaInsets()
|
||||
const {footerHeight} = useShellLayout()
|
||||
const {setFooterHeight} = useShellLayout()
|
||||
const {isAtHome, isAtSearch, isAtNotifications, isAtMyProfile, isAtMessages} =
|
||||
useNavigationTabState()
|
||||
const numUnreadNotifications = useUnreadNotifications()
|
||||
@@ -152,9 +152,7 @@ export function BottomBar({navigation}: BottomTabBarProps) {
|
||||
{paddingBottom: clamp(safeAreaInsets.bottom, 15, 60)},
|
||||
footerMinimalShellTransform,
|
||||
]}
|
||||
onLayout={e => {
|
||||
footerHeight.set(e.nativeEvent.layout.height)
|
||||
}}>
|
||||
onLayout={evt => setFooterHeight(evt.nativeEvent.layout.height)}>
|
||||
{hasSession ? (
|
||||
<>
|
||||
<Btn
|
||||
|
||||
@@ -51,7 +51,7 @@ export function BottomBarWeb() {
|
||||
const footerMinimalShellTransform = useMinimalShellFooterTransform()
|
||||
const {requestSwitchToAccount} = useLoggedOutViewControls()
|
||||
const closeAllActiveElements = useCloseAllActiveElements()
|
||||
const {footerHeight} = useShellLayout()
|
||||
const {setFooterHeight} = useShellLayout()
|
||||
const hideBorder = useHideBottomBarBorder()
|
||||
const iconWidth = 26
|
||||
|
||||
@@ -83,7 +83,7 @@ export function BottomBarWeb() {
|
||||
: t.atoms.border_contrast_low,
|
||||
footerMinimalShellTransform,
|
||||
]}
|
||||
onLayout={event => footerHeight.set(event.nativeEvent.layout.height)}>
|
||||
onLayout={evt => setFooterHeight(evt.nativeEvent.layout.height)}>
|
||||
{hasSession ? (
|
||||
<>
|
||||
<NavItem
|
||||
|
||||
Reference in New Issue
Block a user