Skip to content

Commit

Permalink
linagora#2712 Fixed trash size not being shown at initial render
Browse files Browse the repository at this point in the history
  • Loading branch information
rezk2ll committed Feb 3, 2023
1 parent d2ba9bf commit a427186
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions twake/frontend/src/app/views/applications/drive/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default ({ initialParentId }: { initialParentId?: string }) => {

const { download, downloadZip, update } = useDriveActions();
const { item, inTrash, refresh, children, loading, path } = useDriveItem(parentId);
const { item: trash, refresh: refreshTrash } = useDriveItem('trash');
const { item: trash } = useDriveItem('trash');
const { uploadTree } = useDriveUpload();
useDriveRealtime(parentId);

Expand All @@ -55,8 +55,8 @@ export default ({ initialParentId }: { initialParentId?: string }) => {
useEffect(() => {
setChecked({});
refresh(parentId);
if (parentId === 'root' || parentId === 'trash') refreshTrash(parentId);
}, [parentId, refresh, refreshTrash]);
refresh("trash");
}, [parentId, refresh]);

const openItemModal = useCallback(() => {
if (item?.id) setCreationModalState({ open: true, parent_id: item.id });
Expand Down

0 comments on commit a427186

Please sign in to comment.