🐛 Fix refresh on item delete/restore

Co-authored-by: Monta <monta@HP-ProBook-445-14-inch-G9-Notebook-PC-505aadfc.localdomain>
This commit is contained in:
Montassar Ghanmy
2024-07-22 14:35:29 +01:00
committed by GitHub
parent 2de9bb91ed
commit b1b635a8c7
@@ -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'));
}