Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3ca5ec4 authored by tibbi's avatar tibbi
Browse files

properly format "No reminder" time

parent 1c130de3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ buildscript {
        propMinSdkVersion = 16
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '3.16.16'
        propVersionName = '3.16.17'
        kotlin_version = '1.2.31'
        support_libs = '27.1.0'
    }
+1 −1
Original line number Diff line number Diff line
@@ -415,7 +415,7 @@ fun Context.formatSecondsToTimeString(totalSeconds: Int): String {
    return result
}

fun Context.getFormattedMinutes(minutes: Int, showBefore: Boolean = true) = getFormattedSeconds(minutes * 60, showBefore)
fun Context.getFormattedMinutes(minutes: Int, showBefore: Boolean = true) = getFormattedSeconds(if (minutes <= 0) minutes else minutes * 60, showBefore)

fun Context.getFormattedSeconds(seconds: Int, showBefore: Boolean = true) = when (seconds) {
    -1 -> getString(R.string.no_reminder)