From b1b635a8c7f2004e2b1619a02a7eb90e809a55c8 Mon Sep 17 00:00:00 2001 From: Montassar Ghanmy Date: Mon, 22 Jul 2024 14:35:29 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20refresh=20on=20item=20dele?= =?UTF-8?q?te/restore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Monta --- .../src/app/features/drive/hooks/use-drive-actions.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tdrive/frontend/src/app/features/drive/hooks/use-drive-actions.tsx b/tdrive/frontend/src/app/features/drive/hooks/use-drive-actions.tsx index a49d0cc9f..ba776e040 100644 --- a/tdrive/frontend/src/app/features/drive/hooks/use-drive-actions.tsx +++ b/tdrive/frontend/src/app/features/drive/hooks/use-drive-actions.tsx @@ -114,7 +114,7 @@ export const useDriveActions = () => { async (id: string, parentId: string) => { try { await DriveApiClient.remove(companyId, id); - await refresh(parentId || ''); + await refresh(parentId || '', true); await getQuota(); } catch (e) { ToasterService.error(Languages.t('hooks.use-drive-actions.unable_remove_file')); @@ -127,7 +127,7 @@ export const useDriveActions = () => { async (id: string, parentId: string) => { try { await DriveApiClient.restore(companyId, id); - await refresh(parentId || ''); + await refresh(parentId || '', true); } catch (e) { ToasterService.error(Languages.t('hooks.use-drive-actions.unable_restore_file')); } @@ -158,7 +158,7 @@ export const useDriveActions = () => { level: level, }; await DriveApiClient.updateLevel(companyId, id, updateBody); - await refresh(id || ''); + await refresh(id || '', true); } catch (e) { ToasterService.error(Languages.t('hooks.use-drive-actions.unable_update_file')); }