Added type Note

This commit is contained in:
2024-11-24 09:32:05 +01:00
parent 876c68ce81
commit 841da9e28e
6 changed files with 29 additions and 1 deletions

View File

@ -59,7 +59,12 @@ class LunaEventRecyclerAdapter: RecyclerView.Adapter<LunaEventRecyclerAdapter.Lu
) {
val item = items.get(position)
holder.type.text = item.getTypeEmoji(context)
holder.description.text = item.getTypeDescription(context)
holder.description.text = when(item.type) {
LunaEvent.TYPE_MEDICINE -> item.notes
LunaEvent.TYPE_NOTE -> item.notes
LunaEvent.TYPE_CUSTOM -> item.notes
else -> item.getTypeDescription(context)
}
holder.time.text = formatTimeAgo(context, item.time)
val qtyText = if ((item.quantity ?: 0) > 0) {
item.quantity.toString() + " " + when (item.type) {