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() {
|
||||
// Changes in the hide collaborator setting will change the artist contents
|
||||
// of the library, consider it a library update.
|
||||
logD("Collaborator setting changed, forwarding update")
|
||||
onMusicChanges(MusicRepository.Changes(deviceLibrary = true, userLibrary = false))
|
||||
invalidator.invalidateMusic(MusicType.ARTISTS, UpdateInstructions.Diff)
|
||||
}
|
||||
|
||||
override fun onSongSortChanged() {
|
||||
|
@ -151,7 +148,14 @@ private class HomeGeneratorImpl(
|
|||
?: emptyList()
|
||||
|
||||
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()
|
||||
|
||||
override fun genres() =
|
||||
|
|
Loading…
Reference in a new issue