make scrollview automatically adapt to footer height
This commit is contained in:
@@ -59,7 +59,7 @@ export function BottomBar({navigation}: BottomTabBarProps) {
|
||||
const t = useTheme()
|
||||
const {_} = useLingui()
|
||||
const safeAreaInsets = useSafeAreaInsets()
|
||||
const {footerHeight} = useShellLayout()
|
||||
const {setFooterHeight} = useShellLayout()
|
||||
const {isAtHome, isAtSearch, isAtNotifications, isAtMyProfile, isAtMessages} =
|
||||
useNavigationTabState()
|
||||
const numUnreadNotifications = useUnreadNotifications()
|
||||
@@ -151,9 +151,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
|
||||
|
||||
Reference in New Issue
Block a user