detail: fix crash on artists w/appearances
This commit is contained in:
parent
64fbd0acbf
commit
147f7f426c
1 changed files with 2 additions and 6 deletions
|
@ -156,13 +156,9 @@ private class DetailGeneratorImpl(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (artist.implicitAlbums.isNotEmpty()) {
|
if (artist.implicitAlbums.isNotEmpty()) {
|
||||||
// groupByTo normally returns a mapping to a MutableList mapping. Since MutableList
|
|
||||||
// inherits list, we can cast upwards and save a copy by directly inserting the
|
|
||||||
// implicit album list into the mapping.
|
|
||||||
logD("Implicit albums present, adding to list")
|
logD("Implicit albums present, adding to list")
|
||||||
@Suppress("UNCHECKED_CAST")
|
grouping[DetailSection.Albums.Category.APPEARANCES] =
|
||||||
(grouping as MutableMap<DetailSection.Albums.Category, Collection<Album>>)[
|
artist.implicitAlbums.toMutableList()
|
||||||
DetailSection.Albums.Category.APPEARANCES] = artist.implicitAlbums
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val sections =
|
val sections =
|
||||||
|
|
Loading…
Reference in a new issue