Show scroll top button regardless of scroll position if there are new posts and auto-loading is disabled

This commit is contained in:
Volpeon
2025-08-03 14:39:28 +02:00
committed by nicole mikołajczyk
parent 13037847c3
commit 740437d9f6

View File

@ -36,7 +36,7 @@ const ScrollTopButton: React.FC<IScrollTopButton> = ({
// Whether we are scrolled above the `autoloadThreshold`.
const [scrolledTop, setScrolledTop] = useState<boolean>(false);
const visible = count > 0 && scrolled;
const visible = count > 0 && (!autoloadTimelines || scrolled);
/** Number of pixels scrolled down from the top of the page. */
const getScrollTop = (): number => (document.scrollingElement || document.documentElement).scrollTop;