Skip to content

Commit

Permalink
Merge pull request #204 from Aga-C/fix-dim-past-tasks
Browse files Browse the repository at this point in the history
Fixed dimming incomplete past tasks in widgets (#203)
  • Loading branch information
naveensingh authored Nov 4, 2024
2 parents 5ed94f7 + 7bd5de5 commit 39aed5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class EventListWidgetAdapter(val context: Context, val intent: Intent) : RemoteV
setText(R.id.event_item_time, "$timeText\n$descriptionText")
}

if (item.isTask && item.isTaskCompleted && dimCompletedTasks || dimPastEvents && item.isPastEvent) {
if (item.isTask && item.isTaskCompleted && dimCompletedTasks || dimPastEvents && item.isPastEvent && !item.isTask) {
curTextColor = weakTextColor
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class MyWidgetMonthlyProvider : AppWidgetProvider() {
val backgroundColor = it.color
var eventTextColor = backgroundColor.getContrastColor()

if (it.isTask() && it.isTaskCompleted() && dimCompletedTasks || !day.isThisMonth || (dimPastEvents && it.isPastEvent)) {
if (it.isTask() && it.isTaskCompleted() && dimCompletedTasks || !day.isThisMonth || (dimPastEvents && it.isPastEvent && !it.isTask())) {
eventTextColor = eventTextColor.adjustAlpha(MEDIUM_ALPHA)
}

Expand Down

0 comments on commit 39aed5f

Please sign in to comment.