From a6737e44402d1e19a4726a7d47c8d07ea23e8816 Mon Sep 17 00:00:00 2001 From: nikec <43032218+niikeec@users.noreply.github.com> Date: Thu, 28 Mar 2024 12:02:48 +0100 Subject: [PATCH] [ENG-1698] Fix invisible thumbnails (#2258) * fix size condition * listen for listViewIconSize change * fix invisible condition --- interface/app/$libraryId/Explorer/FilePath/Thumb.tsx | 5 +---- interface/app/$libraryId/Explorer/FilePath/utils.ts | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/interface/app/$libraryId/Explorer/FilePath/Thumb.tsx b/interface/app/$libraryId/Explorer/FilePath/Thumb.tsx index 6a76dd8b4..0f43d9464 100644 --- a/interface/app/$libraryId/Explorer/FilePath/Thumb.tsx +++ b/interface/app/$libraryId/Explorer/FilePath/Thumb.tsx @@ -259,10 +259,7 @@ const Thumbnail = forwardRef( ) { useEffect(() => { initialized.current = false; - }, [explorerSettings?.gridItemSize]); + }, [explorerSettings?.gridItemSize, explorerSettings?.listViewIconSize]); useCallbackToWatchResize( ({ width, height }) => { - if (initialized.current) return; + if (initialized.current || (!width && !height)) return; setSize({ width, height }); initialized.current = true; },