Fix per-category sort/display affecting the wrong category

This commit is contained in:
arkon
2023-02-23 13:54:08 -05:00
parent 9432d2d06a
commit bd47eafeec
6 changed files with 37 additions and 42 deletions

View File

@@ -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 {