Skip to content

Commit

Permalink
Fixed dimming incomplete past tasks in widgets (FossifyOrg#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aga-C committed Apr 3, 2024
1 parent a83b941 commit c1cf6a3
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 c1cf6a3

Please sign in to comment.