mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2025-01-25 23:01:13 +01:00
Fix reorder filter crash
This commit is contained in:
parent
2670f9b6a4
commit
10a701c211
@ -43,7 +43,10 @@ class LibraryDisplayView @JvmOverloads constructor(context: Context, attrs: Attr
|
|||||||
filterOrder = FilterBottomSheet.Filters.DEFAULT_ORDER
|
filterOrder = FilterBottomSheet.Filters.DEFAULT_ORDER
|
||||||
}
|
}
|
||||||
val adapter = FlexibleAdapter(
|
val adapter = FlexibleAdapter(
|
||||||
filterOrder.toCharArray().map(::ManageFilterItem),
|
filterOrder.toCharArray().map {
|
||||||
|
if (FilterBottomSheet.Filters.filterOf(it) != null) ManageFilterItem(it)
|
||||||
|
else null
|
||||||
|
}.filterNotNull(),
|
||||||
this,
|
this,
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
|
@ -519,7 +519,7 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri
|
|||||||
Completed,
|
Completed,
|
||||||
SeriesType,
|
SeriesType,
|
||||||
Tracked
|
Tracked
|
||||||
).joinToString("")
|
).joinToString("") { it.value.toString() }
|
||||||
|
|
||||||
fun filterOf(char: Char): Filters? {
|
fun filterOf(char: Char): Filters? {
|
||||||
return Filters::class.java.enumConstants?.find { it.value == char }
|
return Filters::class.java.enumConstants?.find { it.value == char }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user