diff --git a/components/system/Files/FileEntry/index.tsx b/components/system/Files/FileEntry/index.tsx index a127fe6b..a50361d7 100644 --- a/components/system/Files/FileEntry/index.tsx +++ b/components/system/Files/FileEntry/index.tsx @@ -181,6 +181,7 @@ const FileEntry: FC = ({ const [showInFileManager, setShowInFileManager] = useState(false); const { formats, sizes } = useTheme(); const listView = useMemo(() => view === "list", [view]); + const detailsView = useMemo(() => view === "details", [view]); const fileName = useMemo(() => basename(path), [path]); const urlExt = useMemo( () => (isDirectory ? "" : getExtension(url)), @@ -306,8 +307,8 @@ const FileEntry: FC = ({ urlExt, ]); const showColumn = useMemo( - () => isVisible && columns !== undefined && view === "details", - [columns, isVisible, view] + () => isVisible && columns !== undefined && detailsView, + [columns, detailsView, isVisible] ); const columnWidth = useMemo( () => @@ -344,7 +345,12 @@ const FileEntry: FC = ({ ); useEffect(() => { - if (!isLoadingFileManager && isVisible && !isIconCached.current) { + if ( + !isLoadingFileManager && + isVisible && + !isIconCached.current && + !detailsView + ) { const updateIcon = async (): Promise => { if (icon.startsWith("blob:") || icon.startsWith("data:")) { if (icon.startsWith("data:image/jpeg;base64,")) return; @@ -504,6 +510,7 @@ const FileEntry: FC = ({ getIconAbortController.current.abort(); } }, [ + detailsView, exists, fs, getIcon,