diff --git a/app/build.gradle b/app/build.gradle index 19723116..81933cbd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -41,7 +41,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:3.15.10' + implementation 'com.simplemobiletools:commons:3.15.11' implementation 'com.facebook.stetho:stetho:1.5.0' implementation 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.shawnlin:number-picker:2.4.6' diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/fragments/TimerFragment.kt b/app/src/main/kotlin/com/simplemobiletools/clock/fragments/TimerFragment.kt index 6153b535..7449d358 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/fragments/TimerFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/fragments/TimerFragment.kt @@ -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 {