diff --git a/CHANGELOG.md b/CHANGELOG.md index 5634d556e..67675d3e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co - Fixed Kitsu login and other requests that send data failing with "Failed to bypass Cloudflare" ([@AntsyLich](https://github.com/AntsyLich)) - Fixed tracker start date being off by a day when adding tracking to an entry with read history in some timezones ([@hazptr](https://github.com/hazptr)) ([#4049](https://github.com/mihonapp/mihon/pull/4049)) - Fixed the paged reader crashing when moving to another chapter after a wide page of a neighbouring chapter was split ([@AntsyLich](https://github.com/AntsyLich)) +- Fixed a crash when opening the filters of a source with an invalid filter ([@AntsyLich](https://github.com/AntsyLich)) ## [v0.21.1] - 2026-10-12 ### Fixed diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterDialog.kt index 6ff7c6087..82e573dfe 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterDialog.kt @@ -169,7 +169,7 @@ private fun Int.toTriStateFilter(): TriState { Filter.TriState.STATE_IGNORE -> TriState.DISABLED Filter.TriState.STATE_INCLUDE -> TriState.ENABLED_IS Filter.TriState.STATE_EXCLUDE -> TriState.ENABLED_NOT - else -> throw IllegalStateException("Unknown TriState state: $this") + else -> TriState.DISABLED } } diff --git a/presentation-core/src/main/java/tachiyomi/presentation/core/components/SettingsItems.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/SettingsItems.kt index b60665626..ca367add7 100644 --- a/presentation-core/src/main/java/tachiyomi/presentation/core/components/SettingsItems.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/components/SettingsItems.kt @@ -300,7 +300,7 @@ fun SelectItem( vertical = SettingsItemsPaddings.Vertical, ), label = { Text(text = label) }, - value = options[selectedIndex].toString(), + value = options.getOrNull(selectedIndex)?.toString().orEmpty(), onValueChange = {}, readOnly = true, singleLine = true,