fix #26, show Hours field at duration if it is exactly 3600 seconds

This commit is contained in:
tibbi 2018-03-28 17:32:46 +02:00
parent 32c41e9261
commit 247009602e
2 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:3.17.5'
implementation 'com.simplemobiletools:commons:3.17.6'
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'

View File

@ -159,6 +159,7 @@ class TimerFragment : Fragment() {
private fun updateDisplayedText(): Boolean {
val diff = initialSecs - totalTicks
var formattedDuration = Math.abs(diff).getFormattedDuration()
if (diff < 0) {
formattedDuration = "-$formattedDuration"
if (!isForegrounded) {