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()) {
|
||||
// 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")
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
(grouping as MutableMap<DetailSection.Albums.Category, Collection<Album>>)[
|
||||
DetailSection.Albums.Category.APPEARANCES] = artist.implicitAlbums
|
||||
grouping[DetailSection.Albums.Category.APPEARANCES] =
|
||||
artist.implicitAlbums.toMutableList()
|
||||
}
|
||||
|
||||
val sections =
|
||||
|
|
Loading…
Reference in a new issue