1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-19 21:46:50 -04:00

Fixed: Sidebar flickering on mobile

This commit is contained in:
Bogdan
2025-04-28 11:56:16 +03:00
parent 704d920dab
commit 65a532a7fd
@@ -363,7 +363,8 @@ function PageSidebar({ isSidebarVisible, isSmallScreen }: PageSidebarProps) {
});
}, []);
const handleTouchEnd = useCallback((event: TouchEvent) => {
const handleTouchEnd = useCallback(
(event: TouchEvent) => {
const touches = event.changedTouches;
const currentTouch = touches[0].pageX;
@@ -384,13 +385,15 @@ function PageSidebar({ isSidebarVisible, isSmallScreen }: PageSidebarProps) {
} else {
setSidebarTransform({
transition: 'none',
transform: 0,
transform: isSidebarVisible ? 0 : SIDEBAR_WIDTH * -1,
});
}
touchStartX.current = null;
touchStartY.current = null;
}, []);
},
[isSidebarVisible]
);
const handleTouchCancel = useCallback(() => {
touchStartX.current = null;