diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySettingsSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySettingsSheet.kt index a852af28d..c199ede99 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySettingsSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySettingsSheet.kt @@ -51,10 +51,14 @@ class LibrarySettingsSheet( * @param currentCategory ID of currently shown category */ fun show(currentCategory: Category) { + filters.adjustFilterSelection() + sort.currentCategory = currentCategory sort.adjustDisplaySelection() + display.currentCategory = currentCategory display.adjustDisplaySelection() + super.show() } @@ -82,6 +86,12 @@ class LibrarySettingsSheet( setGroups(listOf(filterGroup)) } + // Refreshes Filter Setting selections + fun adjustFilterSelection() { + filterGroup.initModels() + filterGroup.items.forEach { adapter.notifyItemChanged(it) } + } + /** * Returns true if there's at least one filter from [FilterGroup] active. */ @@ -126,6 +136,7 @@ class LibrarySettingsSheet( downloaded.enabled = false } else { downloaded.state = libraryPreferences.filterDownloaded().get() + downloaded.enabled = true } unread.state = libraryPreferences.filterUnread().get() started.state = libraryPreferences.filterStarted().get()