diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index de57bcb732..550d74df13 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -385,12 +385,14 @@ class LibraryController( swipe_refresh.isRefreshing = false if (!LibraryUpdateService.isRunning()) { when { - !presenter.showAllCategories || presenter.groupType != BY_DEFAULT -> { - presenter.categories.find { it.id == presenter.currentCategory }?.let { + !presenter.showAllCategories && presenter.groupType == BY_DEFAULT -> { + presenter.allCategories.find { it.id == presenter.currentCategory }?.let { updateLibrary(it) } } - presenter.allCategories.size <= 1 -> updateLibrary() + presenter.allCategories.size <= 1 || presenter.groupType > BY_DEFAULT -> { + updateLibrary() + } preferences.updateOnRefresh().getOrDefault() == -1 -> { MaterialDialog(activity!!).title(R.string.what_should_update) .negativeButton(android.R.string.cancel) 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 400054092f..aa606f8707 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 @@ -435,7 +435,7 @@ class LibraryPresenter( val categories = db.getCategories().executeAsBlocking().toMutableList() var libraryManga = db.getLibraryMangas().executeAsBlocking() val showAll = showAllCategories - if (groupType <= BY_DEFAULT || !libraryIsGrouped) { + if (groupType > BY_DEFAULT) { libraryManga = libraryManga.distinctBy { it.id } }