mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-06-05 22:19:17 +02:00
fix #26, show Hours field at duration if it is exactly 3600 seconds
This commit is contained in:
@ -41,7 +41,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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.facebook.stetho:stetho:1.5.0'
|
||||||
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
|
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
|
||||||
implementation 'com.shawnlin:number-picker:2.4.6'
|
implementation 'com.shawnlin:number-picker:2.4.6'
|
||||||
|
@ -159,6 +159,7 @@ class TimerFragment : Fragment() {
|
|||||||
private fun updateDisplayedText(): Boolean {
|
private fun updateDisplayedText(): Boolean {
|
||||||
val diff = initialSecs - totalTicks
|
val diff = initialSecs - totalTicks
|
||||||
var formattedDuration = Math.abs(diff).getFormattedDuration()
|
var formattedDuration = Math.abs(diff).getFormattedDuration()
|
||||||
|
|
||||||
if (diff < 0) {
|
if (diff < 0) {
|
||||||
formattedDuration = "-$formattedDuration"
|
formattedDuration = "-$formattedDuration"
|
||||||
if (!isForegrounded) {
|
if (!isForegrounded) {
|
||||||
|
Reference in New Issue
Block a user