3 Commits

Author SHA1 Message Date
58088aeec7 MainActivity: use System.currentTimeMillis
A little better way to get the ms since epoch.
2025-12-12 15:03:31 +01:00
907decf8d1 MainActivity: do not switch logbook on reload 2025-12-12 15:01:47 +01:00
7700258414 LunaEvent: reorganize event text getters
Use method names that better reflect
the use of the returned text.
2025-12-12 15:01:15 +01:00
2 changed files with 3 additions and 3 deletions

View File

@@ -104,7 +104,7 @@ class LunaEvent: Comparable<LunaEvent> {
} }
fun getDialogTitle(context: Context): String { fun getDialogTitle(context: Context): String {
return getDialogTitle(context, type) return getTypeDescription(context, type)
} }
fun getRowItemTitle(context: Context): String { fun getRowItemTitle(context: Context): String {
@@ -168,7 +168,7 @@ class LunaEvent: Comparable<LunaEvent> {
) )
} }
fun getDialogTitle(context: Context, type: Type): String { fun getTypeDescription(context: Context, type: Type): String {
return context.getString( return context.getString(
when (type) { when (type) {
Type.BABY_BOTTLE -> R.string.event_bottle_desc Type.BABY_BOTTLE -> R.string.event_bottle_desc

View File

@@ -101,7 +101,7 @@ class NumericUtils (val context: Context) {
else -> "" else -> ""
}) })
} }
return formatted.toString().trim() return formatted.toString()
} }
/** /**