mark running all-day events with the primary color

This commit is contained in:
tibbi 2017-05-24 19:42:34 +02:00
parent b2fe7950a6
commit fd2ec79435
1 changed files with 6 additions and 1 deletions

View File

@ -173,7 +173,12 @@ class EventListAdapter(val activity: SimpleActivity, val mItems: List<ListItem>,
var startTextColor = textColor var startTextColor = textColor
var endTextColor = textColor var endTextColor = textColor
if (item.startTS <= mNow && item.endTS <= mNow) { if (item.startTS <= mNow && item.endTS <= mNow) {
if (item.isAllDay) {
if (Formatter.getDayCodeFromTS(item.startTS) == Formatter.getDayCodeFromTS(mNow))
startTextColor = primaryColor
} else {
startTextColor = redTextColor startTextColor = redTextColor
}
endTextColor = redTextColor endTextColor = redTextColor
} else if (item.startTS <= mNow && item.endTS >= mNow) { } else if (item.startTS <= mNow && item.endTS >= mNow) {
startTextColor = primaryColor startTextColor = primaryColor