Mirror — see github.com/blacksky-algorithms/blacksky.community
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

Reset footerHeight on BottomBarWeb unmount

When the window expands past the mobile breakpoint, BottomBarWeb
unmounts and DesktopLeftNav renders instead. However footerHeight
(a SharedValue set by onLayout) remained at ~50px from the prior
render. This stale value caused the message input translateY to
pull it over the message list at intermediate breakpoints where
the bar no longer exists.

Clear footerHeight to 0 on unmount so consumers like MessagesList
see the correct value regardless of breakpoint transitions.

+9
+9
src/view/shell/bottom-bar/BottomBarWeb.tsx
··· 55 55 const hideBorder = useHideBottomBarBorder() 56 56 const iconWidth = 26 57 57 58 + // Reset footerHeight when the bottom bar unmounts (e.g. window expands past 59 + // mobile breakpoint). Without this, stale footerHeight causes the message 60 + // input translateY to pull it over the message list on wider screens. 61 + React.useEffect(() => { 62 + return () => { 63 + footerHeight.set(0) 64 + } 65 + }, [footerHeight]) 66 + 58 67 const unreadMessageCount = useUnreadMessageCount() 59 68 const notificationCountStr = useUnreadNotifications() 60 69