fix(settings): fix crash that occurred when editing time
This commit is contained in:
@@ -33,10 +33,9 @@ object MinutesInputTransformation : InputTransformation {
|
|||||||
|
|
||||||
object MinutesOutputTransformation : OutputTransformation {
|
object MinutesOutputTransformation : OutputTransformation {
|
||||||
override fun TextFieldBuffer.transformOutput() {
|
override fun TextFieldBuffer.transformOutput() {
|
||||||
if (this.length == 0) {
|
when (this.length) {
|
||||||
insert(0, "00")
|
0 -> insert(0, "00")
|
||||||
} else if (this.toString().toInt() < 10) {
|
1 -> insert(0, "0")
|
||||||
insert(0, "0")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user