diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt index 7940f86ab9..fb813580ec 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt @@ -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