Skip to content

Instantly share code, notes, and snippets.

@aqua30
Created May 28, 2022 08:12
Show Gist options
  • Save aqua30/bb8e56f3ee0c3db0b3814a521f918ff8 to your computer and use it in GitHub Desktop.
Save aqua30/bb8e56f3ee0c3db0b3814a521f918ff8 to your computer and use it in GitHub Desktop.
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