add bath event type

This commit is contained in:
2025-09-29 03:20:18 +02:00
parent 19bf58f400
commit e7070b23c6
4 changed files with 22 additions and 0 deletions

View File

@@ -801,6 +801,12 @@ class MainActivity : AppCompatActivity() {
askWeightValue()
dismiss()
})
contentView.findViewById<View>(R.id.button_bath).setOnClickListener({
logEvent(
LunaEvent(LunaEvent.TYPE_BATH)
)
dismiss()
})
}.also { popupWindow ->
popupWindow.setOnDismissListener({
Handler(mainLooper).postDelayed({

View File

@@ -29,6 +29,7 @@ class LunaEvent: Comparable<LunaEvent> {
const val TYPE_TEMPERATURE = "TEMPERATURE"
const val TYPE_FOOD = "FOOD"
const val TYPE_PUKE = "PUKE"
const val TYPE_BATH = "BATH"
}
private val jo: JSONObject
@@ -92,6 +93,7 @@ class LunaEvent: Comparable<LunaEvent> {
TYPE_COLIC -> R.string.event_colic_type
TYPE_FOOD -> R.string.event_food_type
TYPE_PUKE -> R.string.event_puke_type
TYPE_BATH -> R.string.event_bath_type
else -> R.string.event_unknown_type
}
)
@@ -114,6 +116,7 @@ class LunaEvent: Comparable<LunaEvent> {
TYPE_COLIC -> R.string.event_colic_desc
TYPE_FOOD -> R.string.event_food_desc
TYPE_PUKE -> R.string.event_puke_desc
TYPE_BATH -> R.string.event_bath_desc
else -> R.string.event_unknown_desc
}
)