LunaEvent: reorganize event text getters

Use method names that better reflect
the use of the returned text.
This commit is contained in:
2025-12-12 14:59:00 +01:00
parent b88b88623e
commit b1fc3ce890
3 changed files with 25 additions and 22 deletions

View File

@@ -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