mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-21 22:05:38 -04:00
Fixed: Series posters flickering when width changes repeatedly
Closes #6311
This commit is contained in:
committed by
Mark McDowall
parent
91f33c670e
commit
53cf530893
@@ -202,13 +202,18 @@ export default function SeriesIndexPosters(props: SeriesIndexPostersProps) {
|
||||
if (current) {
|
||||
const width = current.clientWidth;
|
||||
const padding = bodyPadding - 5;
|
||||
const finalWidth = width - padding * 2;
|
||||
|
||||
if (Math.abs(size.width - finalWidth) < 20 || size.width === finalWidth) {
|
||||
return;
|
||||
}
|
||||
|
||||
setSize({
|
||||
width: width - padding * 2,
|
||||
width: finalWidth,
|
||||
height: window.innerHeight,
|
||||
});
|
||||
}
|
||||
}, [isSmallScreen, scrollerRef, bounds]);
|
||||
}, [isSmallScreen, size, scrollerRef, bounds]);
|
||||
|
||||
useEffect(() => {
|
||||
const currentScrollerRef = scrollerRef.current as HTMLElement;
|
||||
|
||||
Reference in New Issue
Block a user