From 6f9a437bb9f01d8ca3d3a3ec96589212a839192d Mon Sep 17 00:00:00 2001 From: Jay Date: Wed, 6 May 2020 05:00:45 -0400 Subject: [PATCH] Fixed unchecking read filter --- .../tachiyomi/ui/library/filter/FilterBottomSheet.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/FilterBottomSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/FilterBottomSheet.kt index 88b9cbf83c..cf679b1c61 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/FilterBottomSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/FilterBottomSheet.kt @@ -280,7 +280,13 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri null } unread -> { - preferences.filterUnread().set(if (index in 0..1) index + 3 else 2) + preferences.filterUnread().set( + when (index) { + in 0..1 -> index + 3 + 2 -> 2 + else -> 0 + } + ) null } allUnread -> {