🐛 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:
@@ -114,7 +114,7 @@ export const useDriveActions = () => {
|
|||||||
async (id: string, parentId: string) => {
|
async (id: string, parentId: string) => {
|
||||||
try {
|
try {
|
||||||
await DriveApiClient.remove(companyId, id);
|
await DriveApiClient.remove(companyId, id);
|
||||||
await refresh(parentId || '');
|
await refresh(parentId || '', true);
|
||||||
await getQuota();
|
await getQuota();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ToasterService.error(Languages.t('hooks.use-drive-actions.unable_remove_file'));
|
ToasterService.error(Languages.t('hooks.use-drive-actions.unable_remove_file'));
|
||||||
@@ -127,7 +127,7 @@ export const useDriveActions = () => {
|
|||||||
async (id: string, parentId: string) => {
|
async (id: string, parentId: string) => {
|
||||||
try {
|
try {
|
||||||
await DriveApiClient.restore(companyId, id);
|
await DriveApiClient.restore(companyId, id);
|
||||||
await refresh(parentId || '');
|
await refresh(parentId || '', true);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ToasterService.error(Languages.t('hooks.use-drive-actions.unable_restore_file'));
|
ToasterService.error(Languages.t('hooks.use-drive-actions.unable_restore_file'));
|
||||||
}
|
}
|
||||||
@@ -158,7 +158,7 @@ export const useDriveActions = () => {
|
|||||||
level: level,
|
level: level,
|
||||||
};
|
};
|
||||||
await DriveApiClient.updateLevel(companyId, id, updateBody);
|
await DriveApiClient.updateLevel(companyId, id, updateBody);
|
||||||
await refresh(id || '');
|
await refresh(id || '', true);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ToasterService.error(Languages.t('hooks.use-drive-actions.unable_update_file'));
|
ToasterService.error(Languages.t('hooks.use-drive-actions.unable_update_file'));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user