Remove redundant API call to add uploaded file to it's existing collection

This commit is contained in:
Vishnu Mohandas 2020-10-22 04:06:55 +05:30
parent 26f3e62c0e
commit e47c7841a3

View file

@ -66,8 +66,9 @@ class FavoritesService {
if (fileID == null) {
file.collectionID = collectionID;
fileID = (await _fileUploader.encryptAndUploadFile(file)).uploadedFileID;
} else {
return _collectionsService.addToCollection(collectionID, [file]);
}
return _collectionsService.addToCollection(collectionID, [file]);
}
Future<int> getOrCreateFavoriteCollectionID() async {