improve statistics

This commit is contained in:
2025-11-26 23:04:22 +01:00
parent bbf3b0ce8e
commit 7d480d6e1c
5 changed files with 429 additions and 156 deletions

View File

@@ -59,7 +59,12 @@ class LunaEventRecyclerAdapter: RecyclerView.Adapter<LunaEventRecyclerAdapter.Lu
LunaEvent.TYPE_CUSTOM -> item.notes
else -> item.getTypeDescription(context)
}
holder.time.text = DateUtils.formatTimeAgo(context, item.getEndTime())
val endTime = if (item.type == LunaEvent.TYPE_SLEEP) {
item.quantity + item.time
} else {
item.time
}
holder.time.text = DateUtils.formatTimeAgo(context, endTime)
var quantityText = numericUtils.formatEventQuantity(item)
// if the event is weight, show difference with the last one