moves out clearSelection and syncWithRemote to caller

This commit is contained in:
abhinav-grd 2021-09-27 09:26:01 +05:30
parent 8ea85efafb
commit ea8fd240b5

View file

@ -21,8 +21,6 @@ export async function copyOrMoveFromCollection(
setCollectionSelectorView: (value: boolean) => void,
selected: SelectedState,
files: File[],
clearSelection: () => void,
syncWithRemote: () => Promise<void>,
setActiveCollection: (id: number) => void,
collectionName: string,
existingCollection: Collection
@ -52,8 +50,6 @@ export async function copyOrMoveFromCollection(
default:
throw Error(CustomError.INVALID_COLLECTION_OPERATION);
}
clearSelection();
await syncWithRemote();
setActiveCollection(collection.id);
}