mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-06-05 22:19:17 +02:00
prepend remaining time with a Minus sign at negative time
This commit is contained in:
@ -147,7 +147,16 @@ class TimerFragment : Fragment() {
|
||||
}
|
||||
|
||||
private fun updateDisplayedText() {
|
||||
view.timer_time.text = (initialSecs - totalTicks).getFormattedDuration()
|
||||
val diff = initialSecs - totalTicks
|
||||
var formattedDuration = Math.abs(diff).getFormattedDuration()
|
||||
if (diff < 0) {
|
||||
formattedDuration = "-$formattedDuration"
|
||||
}
|
||||
|
||||
view.timer_time.text = formattedDuration
|
||||
if (diff == 0) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private val updateRunnable = object : Runnable {
|
||||
|
Reference in New Issue
Block a user