albums: hide grouped albums containing hidden items only
This commit is contained in:
parent
09df269ee0
commit
df63f06897
2 changed files with 9 additions and 4 deletions
|
@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
|
|||
### Fixed
|
||||
|
||||
- albums: show groups to move/copy/export items
|
||||
- albums: hide grouped albums containing hidden items only
|
||||
|
||||
## <a id="v1.13.0"></a>[v1.13.0] - 2025-05-12
|
||||
|
||||
|
|
|
@ -111,21 +111,25 @@ class AlbumListPage extends StatelessWidget {
|
|||
|
||||
final listedStoredAlbums = <String>{};
|
||||
if (albumChipTypes.contains(AlbumChipType.stored)) {
|
||||
final allAlbums = source.rawAlbums;
|
||||
if (groupUri == null) {
|
||||
final withinGroups = whereTypeRecursively<StoredAlbumFilter>(groupContent).map((v) => v.album).toSet();
|
||||
listedStoredAlbums.addAll(source.rawAlbums.whereNot(withinGroups.contains));
|
||||
listedStoredAlbums.addAll(allAlbums.whereNot(withinGroups.contains));
|
||||
} else {
|
||||
listedStoredAlbums.addAll(groupContent.whereType<StoredAlbumFilter>().map((v) => v.album));
|
||||
// check that group content is listed from source, to prevent displaying hidden content
|
||||
listedStoredAlbums.addAll(groupContent.whereType<StoredAlbumFilter>().map((v) => v.album).where(allAlbums.contains));
|
||||
}
|
||||
}
|
||||
|
||||
final listedDynamicAlbums = <DynamicAlbumFilter>{};
|
||||
if (albumChipTypes.contains(AlbumChipType.dynamic)) {
|
||||
final allDynamicAlbums = dynamicAlbums.all;
|
||||
if (groupUri == null) {
|
||||
final withinGroups = whereTypeRecursively<DynamicAlbumFilter>(groupContent).toSet();
|
||||
listedDynamicAlbums.addAll(dynamicAlbums.all.whereNot(withinGroups.contains));
|
||||
listedDynamicAlbums.addAll(allDynamicAlbums.whereNot(withinGroups.contains));
|
||||
} else {
|
||||
listedDynamicAlbums.addAll(groupContent.whereType<DynamicAlbumFilter>());
|
||||
// check that group content is listed from source, to prevent displaying hidden content
|
||||
listedDynamicAlbums.addAll(groupContent.whereType<DynamicAlbumFilter>().where(allDynamicAlbums.contains));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue