Resolving hiqua's comments

pull/1319/head
Jakub Kalinowski 4 years ago
parent 3b650d63b4
commit c2731c03c3

@ -27,7 +27,7 @@ data class Entry(
/**
* Value indicating that the habit is not applicable for this timestamp.
*/
const val SKIP = -2
const val SKIP = 3
/**
* Value indicating that the user has performed the habit at this timestamp.

@ -153,15 +153,11 @@ class HistoryCardPresenter(
val series = if (habit.isNumerical) {
entries.map {
when {
it.value == SKIP -> {
HistoryChart.Square.HATCHED
}
it.value > 0 -> {
HistoryChart.Square.ON
}
else -> {
HistoryChart.Square.OFF
}
it.value == Entry.UNKNOWN -> OFF
it.value == SKIP -> HATCHED
(habit.targetType == AT_MOST) && (it.value / 1000.0 <= habit.targetValue) -> ON
(habit.targetType == AT_LEAST) && (it.value / 1000.0 >= habit.targetValue) -> ON
else -> GREY
}
}
} else {

Loading…
Cancel
Save