Nicolium: improve scroll top button handling

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-02-21 12:52:48 +01:00
parent e6a720c93f
commit 8b74e7216c

View File

@ -34,8 +34,9 @@ const ScrollTopButton: React.FC<IScrollTopButton> = ({
const [scrolled, setScrolled] = useState<boolean>(false);
// Whether we are scrolled above the `autoloadThreshold`.
const [scrolledTop, setScrolledTop] = useState<boolean>(false);
console.log(scrolled, scrolledTop);
const visible = count > 0 && (!autoloadTimelines || scrolled);
const visible = count > 0 && (autoloadThreshold ? scrolled : scrolledTop);
/** Number of pixels scrolled down from the top of the page. */
const getScrollTop = (): number =>