forked from penguin86/luna-tracker
Compare commits
3 Commits
19774016e1
...
11a4f12fbe
| Author | SHA1 | Date | |
|---|---|---|---|
| 11a4f12fbe | |||
| 9398e5c406 | |||
| 5a9488fdb9 |
@@ -59,7 +59,7 @@ class LunaEventRecyclerAdapter: RecyclerView.Adapter<LunaEventRecyclerAdapter.Lu
|
||||
LunaEvent.TYPE_CUSTOM -> item.notes
|
||||
else -> item.getTypeDescription(context)
|
||||
}
|
||||
holder.time.text = DateUtils.formatTimeAgo(context, item.getEndTime())
|
||||
holder.time.text = DateUtils.formatTimeAgo(context, item.time)
|
||||
var quantityText = numericUtils.formatEventQuantity(item)
|
||||
|
||||
// if the event is weight, show difference with the last one
|
||||
|
||||
@@ -94,18 +94,6 @@ class LunaEvent: Comparable<LunaEvent> {
|
||||
this.quantity = quantity
|
||||
}
|
||||
|
||||
fun getStartTime(): Long {
|
||||
return time
|
||||
}
|
||||
|
||||
fun getEndTime(): Long {
|
||||
return if (type == TYPE_SLEEP) {
|
||||
time + quantity
|
||||
} else {
|
||||
time
|
||||
}
|
||||
}
|
||||
|
||||
fun getTypeEmoji(context: Context): String {
|
||||
return context.getString(
|
||||
when (type) {
|
||||
|
||||
Reference in New Issue
Block a user