forked from penguin86/luna-tracker
improve statistics
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user