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 6, 2023
1 parent ca47f4b commit 7eb679f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions twake/frontend/src/app/views/applications/drive/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ export default ({ initialParentId }: { initialParentId?: string }) => {
const [parentId, setParentId] = useRecoilState(DriveCurrentFolderAtom(initialParentId || 'root'));

const { download, downloadZip, update } = useDriveActions();
<<<<<<< HEAD
const { access, item, inTrash, refresh, children, loading, path } = useDriveItem(parentId);
const { item: trash, refresh: refreshTrash } = useDriveItem('trash');
=======
const { item, inTrash, refresh, children, loading, path } = useDriveItem(parentId);
const { item: trash } = useDriveItem('trash');
>>>>>>> #2712 Fixed trash size not being shown at initial render
const { uploadTree } = useDriveUpload();
useDriveRealtime(parentId);

Expand All @@ -55,8 +60,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 7eb679f

Please sign in to comment.