home: re-add removed hcollaborator hiding
This commit is contained in:
parent
03be2ef028
commit
64fbd0acbf
1 changed files with 9 additions and 5 deletions
|
@ -87,10 +87,7 @@ private class HomeGeneratorImpl(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onHideCollaboratorsChanged() {
|
override fun onHideCollaboratorsChanged() {
|
||||||
// Changes in the hide collaborator setting will change the artist contents
|
invalidator.invalidateMusic(MusicType.ARTISTS, UpdateInstructions.Diff)
|
||||||
// of the library, consider it a library update.
|
|
||||||
logD("Collaborator setting changed, forwarding update")
|
|
||||||
onMusicChanges(MusicRepository.Changes(deviceLibrary = true, userLibrary = false))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSongSortChanged() {
|
override fun onSongSortChanged() {
|
||||||
|
@ -151,7 +148,14 @@ private class HomeGeneratorImpl(
|
||||||
?: emptyList()
|
?: emptyList()
|
||||||
|
|
||||||
override fun artists() =
|
override fun artists() =
|
||||||
musicRepository.deviceLibrary?.let { listSettings.artistSort.artists(it.artists) }
|
musicRepository.deviceLibrary?.let { deviceLibrary ->
|
||||||
|
val sorted = listSettings.artistSort.artists(deviceLibrary.artists)
|
||||||
|
if (homeSettings.shouldHideCollaborators) {
|
||||||
|
sorted.filter { it.explicitAlbums.isNotEmpty() }
|
||||||
|
} else {
|
||||||
|
sorted
|
||||||
|
}
|
||||||
|
}
|
||||||
?: emptyList()
|
?: emptyList()
|
||||||
|
|
||||||
override fun genres() =
|
override fun genres() =
|
||||||
|
|
Loading…
Reference in a new issue