mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-14 04:58:56 +01:00
Fix per-category sort/display affecting the wrong category
This commit is contained in:
@@ -7,6 +7,21 @@ enum class TriState(val value: Int) {
|
||||
DISABLED(0),
|
||||
ENABLED_IS(1),
|
||||
ENABLED_NOT(2),
|
||||
;
|
||||
|
||||
fun next(): TriState {
|
||||
return when (this) {
|
||||
DISABLED -> ENABLED_IS
|
||||
ENABLED_IS -> ENABLED_NOT
|
||||
ENABLED_NOT -> DISABLED
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun valueOf(value: Int): TriState {
|
||||
return TriState.values().first { it.value == value }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun Int.toTriStateFilter(): TriStateFilter {
|
||||
|
||||
Reference in New Issue
Block a user