Fixed sectioned library showing the wrong category when returning back to library tab
when using custom grouping
This commit is contained in:
parent
4df4a5b59d
commit
5bdd7dcea9
1 changed files with 2 additions and 3 deletions
|
@ -137,10 +137,9 @@ class LibraryPresenter(
|
|||
|
||||
fun restoreLibrary() {
|
||||
val items = libraryItems
|
||||
val show = showAllCategories || !libraryIsGrouped ||
|
||||
categories.size == 1
|
||||
val show = showAllCategories || !libraryIsGrouped || categories.size == 1
|
||||
if (!show) {
|
||||
sectionedLibraryItems = items.groupBy { it.manga.category }.toMutableMap()
|
||||
sectionedLibraryItems = items.groupBy { it.header.category.id!! }.toMutableMap()
|
||||
if (currentCategory == -1) currentCategory = categories.find {
|
||||
it.order == preferences.lastUsedCategory().getOrDefault()
|
||||
}?.id ?: 0
|
||||
|
|
Reference in a new issue