Created
May 28, 2022 08:04
-
-
Save aqua30/c0c61deb97350683b98883caf891efe1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun addTime(value: String) { | |
val intValue = value.toInt() | |
val hours = TimeUnit( | |
leftDigit = timeState.value.hours.rightDigit, | |
rightDigit = timeState.value.mins.leftDigit, | |
) | |
val mins = TimeUnit( | |
leftDigit = timeState.value.mins.rightDigit, | |
rightDigit = timeState.value.secs.leftDigit, | |
) | |
val secs = TimeUnit( | |
leftDigit = timeState.value.secs.rightDigit, | |
rightDigit = intValue, | |
) | |
timeState.value = timeState.value.copy( | |
hours = hours, | |
mins = mins, | |
secs = secs | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment