clear deletedFileIDs after the sync is done

This commit is contained in:
Abhinav 2023-01-30 15:50:06 +05:30
parent 727956cd63
commit 22425a7456

View file

@ -221,9 +221,7 @@ export default function Gallery() {
useState<SearchResultSummary>(null);
const syncInProgress = useRef(true);
const resync = useRef(false);
const [deletedFileIds, setDeletedFileIds] = useState<Set<number>>(
new Set<number>()
);
const [deletedFileIds, setDeletedFileIds] = useState(new Set<number>());
const { startLoading, finishLoading, setDialogMessage, ...appContext } =
useContext(AppContext);
const [collectionSummaries, setCollectionSummaries] =
@ -551,6 +549,7 @@ export default function Gallery() {
});
} finally {
await syncWithRemote(false, true);
setDeletedFileIds(new Set());
finishLoading();
}
};