Skip to content

Commit 74387b2

Browse files
committed
properly dim past all-day events
1 parent 3d6b793 commit 74387b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/src/main/kotlin/com/simplemobiletools/calendar/adapters/EventListAdapter.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,11 @@ class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList<ListIt
157157

158158
var startTextColor = textColor
159159
var endTextColor = textColor
160-
if (listEvent.isAllDay) {
161-
if (Formatter.getDayCodeFromTS(listEvent.startTS) == Formatter.getDayCodeFromTS(now)) {
160+
if (listEvent.isAllDay || listEvent.startTS <= now && listEvent.endTS <= now) {
161+
if (listEvent.isAllDay && Formatter.getDayCodeFromTS(listEvent.startTS) == Formatter.getDayCodeFromTS(now)) {
162162
startTextColor = primaryColor
163163
}
164-
} else if (listEvent.startTS <= now && listEvent.endTS <= now) {
164+
165165
if (dimPastEvents && listEvent.isPastEvent) {
166166
startTextColor = startTextColor.adjustAlpha(LOW_ALPHA)
167167
endTextColor = endTextColor.adjustAlpha(LOW_ALPHA)

0 commit comments

Comments
 (0)