Fix delete empty album
This commit is contained in:
parent
593ad5e83d
commit
84e40d6d31
1 changed files with 2 additions and 1 deletions
|
@ -87,9 +87,10 @@ class _DeleteEmptyAlbumsState extends State<DeleteEmptyAlbums> {
|
|||
Future<void> _deleteEmptyAlbums() async {
|
||||
final collections =
|
||||
await CollectionsService.instance.getCollectionsWithThumbnails();
|
||||
// remove collections which are not empty or can't be deleted
|
||||
collections.removeWhere(
|
||||
(element) =>
|
||||
element.thumbnail != null || element.collection.type.canDelete,
|
||||
element.thumbnail != null || !element.collection.type.canDelete,
|
||||
);
|
||||
int failedCount = 0;
|
||||
for (int i = 0; i < collections.length; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue