Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

Fix: re-add the scroll boundary to avoid minimal shell at top of screen (#956)

authored by

Paul Frazee and committed by
GitHub
c8eeb6ba 40a87261

+10 -2
+10 -2
src/lib/hooks/useOnMainScroll.ts
··· 6 6 7 7 const DY_LIMIT_UP = isDesktopWeb ? 30 : 10 8 8 const DY_LIMIT_DOWN = isDesktopWeb ? 150 : 10 9 + const Y_LIMIT = 10 9 10 10 11 export type OnScrollCb = ( 11 12 event: NativeSyntheticEvent<NativeScrollEvent>, ··· 24 25 const dy = y - (lastY.current || 0) 25 26 lastY.current = y 26 27 27 - if (!store.shell.minimalShellMode && dy > DY_LIMIT_DOWN) { 28 + if ( 29 + !store.shell.minimalShellMode && 30 + dy > DY_LIMIT_DOWN && 31 + y > Y_LIMIT 32 + ) { 28 33 store.shell.setMinimalShellMode(true) 29 - } else if (store.shell.minimalShellMode && dy < DY_LIMIT_UP * -1) { 34 + } else if ( 35 + store.shell.minimalShellMode && 36 + (dy < DY_LIMIT_UP * -1 || y <= Y_LIMIT) 37 + ) { 30 38 store.shell.setMinimalShellMode(false) 31 39 } 32 40