Skip to content

Instantly share code, notes, and snippets.

@aqua30
Created May 28, 2022
Embed
What would you like to do?
private fun deleteTime() {
val secs = TimeUnit(
rightDigit = timeState.value.secs.leftDigit,
leftDigit = timeState.value.mins.rightDigit,
)
val mins = TimeUnit(
rightDigit = timeState.value.mins.leftDigit,
leftDigit = timeState.value.hours.rightDigit,
)
val hours = TimeUnit(
rightDigit = timeState.value.hours.leftDigit,
leftDigit = 0,
)
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