Merge branch 'scrolltop-fix' into 'main'

Fix ScrollTopButton not loading new posts when scrolled to the top

Closes #871

See merge request soapbox-pub/soapbox!2816
environments/review-main-yi2y9f/deployments/4180
Alex Gleason 2023-10-14 18:34:42 +00:00
commit 374f99405e
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -44,10 +44,10 @@ const ScrollTopButton: React.FC<IScrollTopButton> = ({
/** Unload feed items if scrolled to the top. */
const maybeUnload = useCallback(() => {
if (autoload && scrolledTop) {
if (autoload && scrolledTop && count) {
onClick();
}
}, [autoload, scrolledTop, onClick]);
}, [autoload, scrolledTop, count, onClick]);
/** Set state while scrolling. */
const handleScroll = useCallback(throttle(() => {