Fix starting new timer

pull/1926/head
Alex Baker 2 years ago
parent f5a53e6453
commit 12f9352f69

@ -114,9 +114,10 @@ class TimerControlSet : TaskEditControlComposeFragment() {
stringResource(id = R.string.TEA_timer_est, DateUtils.formatElapsedTime(it.toLong()))
}
val elapsed =
viewModel.elapsedSeconds.collectAsStateLifecycleAware().value.takeIf { it > 0 }
(newElapsed + viewModel.elapsedSeconds.collectAsStateLifecycleAware().value)
.takeIf { it > 0 }
?.let {
stringResource(id = R.string.TEA_timer_elap, DateUtils.formatElapsedTime(it + newElapsed))
stringResource(id = R.string.TEA_timer_elap, DateUtils.formatElapsedTime(it))
}
val text = when {
estimated != null && elapsed != null -> "$estimated, $elapsed"

Loading…
Cancel
Save