Fixes unnecessary canvas scaling

This commit is contained in:
psychedelicious 2022-11-25 10:46:12 +11:00 committed by blessedcoolant
parent 3f0cfaac4a
commit 3aebe754fa

View File

@ -129,8 +129,11 @@ export default function ImageGallery() {
galleryContainerRef.current ? galleryContainerRef.current.scrollTop : 0
)
);
setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400);
}, [dispatch]);
setTimeout(
() => shouldPinGallery && dispatch(setDoesCanvasNeedScaling(true)),
400
);
}, [dispatch, shouldPinGallery]);
const handleClickLoadMore = () => {
dispatch(requestImages(currentCategory));