Update todo text colors

When the date is gray, use the lighter gray we use for things like alarms and streaks (Gray300 in light mode)
 When the date is red, it should be red100 in dark mode (showing as the darker maroon we use in light mode)
This commit is contained in:
Hafiz 2023-05-02 13:24:40 -04:00
parent c9726049d1
commit e142e3960b
3 changed files with 4 additions and 1 deletions

View file

@ -62,5 +62,6 @@
<color name="text_green10_green500">@color/green_500</color>
<color name="gray200_gray400">@color/gray_400</color>
<color name="gray700_gray10">@color/gray_10</color>
<color name="maroon100_red100">@color/red_100</color>
</resources>

View file

@ -129,4 +129,5 @@
<color name="text_green10_green500">@color/green_10</color>
<color name="gray200_gray400">@color/gray_200</color>
<color name="gray700_gray10">@color/gray_700</color>
<color name="maroon100_red100">@color/maroon_100</color>
</resources>

View file

@ -40,9 +40,10 @@ class TodoViewHolder(
specialTaskTextView?.text = context.getString(R.string.today)
} else if (task.isDayOrMorePastDue() == true) {
task.dueDate?.let { specialTaskTextView?.text = dateFormatter.format(it) }
specialTaskTextView?.setTextColor(ContextCompat.getColor(context, R.color.maroon_100))
specialTaskTextView?.setTextColor(ContextCompat.getColor(context, R.color.maroon100_red100))
} else {
task.dueDate?.let { specialTaskTextView?.text = dateFormatter.format(it) }
specialTaskTextView?.setTextColor(ContextCompat.getColor(context, R.color.gray_300))
}
this.specialTaskTextView?.visibility = View.VISIBLE
calendarIconView?.visibility = View.VISIBLE