🐛 Bug fixes (#673)

This commit is contained in:
Montassar Ghanmy
2024-10-01 09:19:00 +01:00
committed by GitHub
parent 5bc7219421
commit 8d172b51f3
5 changed files with 35 additions and 20 deletions
@@ -13,7 +13,7 @@ import { useUserQuota } from 'features/users/hooks/use-user-quota';
* Returns the children of a drive item
* @returns
*/
export const useDriveActions = () => {
export const useDriveActions = (inPublicSharing?: boolean) => {
const companyId = useRouterCompany();
const sharedFilter = useRecoilValue(SharedWithMeFilterState);
const sortItem = useRecoilValue(DriveItemSort);
@@ -142,7 +142,7 @@ export const useDriveActions = () => {
try {
await DriveApiClient.update(companyId, id, update);
await refresh(id || '', true);
await refresh(parentId || '', true);
if (!inPublicSharing) await refresh(parentId || '', true);
if (update?.parent_id !== parentId) await refresh(update?.parent_id || '', true);
} catch (e) {
ToasterService.error(Languages.t('hooks.use-drive-actions.unable_update_file'));