mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-25 02:48:54 +01:00
Fix not unsetting cover after removing the last file
This commit is contained in:
parent
ba0f441635
commit
8450f91afa
1 changed files with 8 additions and 0 deletions
|
@ -32,6 +32,14 @@ class UpdateAutoAlbumCover {
|
||||||
}
|
}
|
||||||
|
|
||||||
Album _updateWithSortedItems(Album album, List<AlbumItem> sortedItems) {
|
Album _updateWithSortedItems(Album album, List<AlbumItem> sortedItems) {
|
||||||
|
if (sortedItems.isEmpty) {
|
||||||
|
if (album.coverProvider != AlbumAutoCoverProvider()) {
|
||||||
|
return album.copyWith(coverProvider: AlbumAutoCoverProvider());
|
||||||
|
} else {
|
||||||
|
return album;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final coverFile = sortedItems
|
final coverFile = sortedItems
|
||||||
.whereType<AlbumFileItem>()
|
.whereType<AlbumFileItem>()
|
||||||
|
|
Loading…
Reference in a new issue