fix(settings): fix crash that occurred when editing time

This commit is contained in:
Nishant Mishra
2025-11-06 07:41:00 +05:30
parent 14c7033b91
commit 250816a034

View File

@@ -33,10 +33,9 @@ object MinutesInputTransformation : InputTransformation {
object MinutesOutputTransformation : OutputTransformation {
override fun TextFieldBuffer.transformOutput() {
if (this.length == 0) {
insert(0, "00")
} else if (this.toString().toInt() < 10) {
insert(0, "0")
when (this.length) {
0 -> insert(0, "00")
1 -> insert(0, "0")
}
}
}