Fix 24hr time format bug on older OSes.

This commit is contained in:
Cody Henthorne
2021-12-13 10:16:27 -05:00
parent a0235cbc6c
commit 93270b90df
5 changed files with 21 additions and 13 deletions

View File

@@ -52,11 +52,11 @@ object NotificationProfiles {
if (storeValues.manuallyEnabledUntil.isForever()) {
return context.getString(R.string.NotificationProfilesFragment__on)
} else if (now < storeValues.manuallyEnabledUntil) {
return context.getString(R.string.NotificationProfileSelection__on_until_s, storeValues.manuallyEnabledUntil.toLocalTime().formatHours())
return context.getString(R.string.NotificationProfileSelection__on_until_s, storeValues.manuallyEnabledUntil.toLocalTime().formatHours(context))
}
}
return context.getString(R.string.NotificationProfileSelection__on_until_s, profile.schedule.endTime().formatHours())
return context.getString(R.string.NotificationProfileSelection__on_until_s, profile.schedule.endTime().formatHours(context))
}
private fun Long.isForever(): Boolean {