feat: Add option to sort alarms

This commit is contained in:
jkemming
2020-12-26 14:09:14 +01:00
committed by jkemming
parent 6c91e072cc
commit 12ee706b4e
37 changed files with 198 additions and 7 deletions

View File

@ -0,0 +1,18 @@
package com.simplemobiletools.clock.models
enum class AlarmSort(open val value: Int) {
CREATED_AT(0),
TIME_OF_DAY(1);
companion object {
fun default(): AlarmSort {
return CREATED_AT
}
fun valueOf(value: Int): AlarmSort? {
return AlarmSort.values()
.filter { it.value == value }
.getOrNull(0)
}
}
}