show streak if today is unchecked

pull/646/head
asdoi 5 years ago
parent c79916de01
commit 94c9ee1460

@ -93,7 +93,7 @@ class HabitCardView(
numberPanel.values = values.map { it / 1000.0 }.toDoubleArray() numberPanel.values = values.map { it / 1000.0 }.toDoubleArray()
if (habit?.isNumerical == false && scoreAsText) { if (habit?.isNumerical == false && scoreAsText) {
streakText.apply { streakText.apply {
visibility = if (values[0] == 0) View.GONE else View.VISIBLE visibility = if (values[1] == 0 && values[0] == 0) View.GONE else View.VISIBLE
} }
} }
} }
@ -262,7 +262,7 @@ class HabitCardView(
} else 0 } else 0
streakText.apply { streakText.apply {
text = lastStreak.toString() text = "$lastStreak |"
setTextColor(when (isLastStreakBestStreak) { setTextColor(when (isLastStreakBestStreak) {
true -> c true -> c
false -> sres.getColor(R.attr.mediumContrastTextColor) false -> sres.getColor(R.attr.mediumContrastTextColor)

Loading…
Cancel
Save