mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 19:55:11 +01:00
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
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user