Skip to content

Commit

Permalink
🐛 Fix refresh on item delete/restore
Browse files Browse the repository at this point in the history
Co-authored-by: Monta <[email protected]>
  • Loading branch information
MontaGhanmy and Monta authored Jul 22, 2024
1 parent 2de9bb9 commit b1b635a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand All @@ -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'));
}
Expand Down Expand Up @@ -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'));
}
Expand Down

0 comments on commit b1b635a

Please sign in to comment.