LunaEvent: reorganize event text getters

Use method names that better reflect
the use of the returned text.
This commit is contained in:
2026-10-12 22:20:15 +02:00
committed by penguin86
parent dbfc7fb866
commit 06180f95a8
3 changed files with 23 additions and 32 deletions
@@ -52,11 +52,11 @@ class LunaEventRecyclerAdapter: RecyclerView.Adapter<LunaEventRecyclerAdapter.Lu
)
holder.quantity.setTextColor(ContextCompat.getColor(context, R.color.textColor))
// Contents
holder.type.text = item.getTypeEmoji(context)
holder.type.text = item.getHeaderEmoji(context)
holder.description.text = when (item.type) {
LunaEvent.Type.MEDICINE -> item.notes
LunaEvent.Type.NOTE -> item.notes
else -> item.getTypeDescription(context)
else -> item.getRowItemTitle(context)
}
val endTime = if (item.type == LunaEvent.Type.SLEEP) {
item.quantity + item.time