only refetch intermediates on modal open if it is enabled

This commit is contained in:
Mary Hipp 2024-02-13 12:29:38 -05:00 committed by psychedelicious
parent 3726293258
commit 85bbf65967

View File

@ -101,9 +101,11 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
const clearStorage = useClearStorage();
const handleOpenSettingsModel = useCallback(() => {
if (shouldShowClearIntermediates) {
refetchIntermediatesCount();
}
_onSettingsModalOpen();
}, [_onSettingsModalOpen, refetchIntermediatesCount]);
}, [_onSettingsModalOpen, refetchIntermediatesCount, shouldShowClearIntermediates]);
const handleClickResetWebUI = useCallback(() => {
clearStorage();