Skip to content

Commit de14702

Browse files
authored
Merge pull request #223 from domlupo/master
fix P0 foreground color for tasks due now
2 parents e3545eb + dd35c64 commit de14702

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

display.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ func (task *Task) Display() {
168168
func (t *Task) Style() RowStyle {
169169
now := time.Now()
170170
style := RowStyle{}
171-
active := t.Status==STATUS_ACTIVE
172-
paused := t.Status==STATUS_PAUSED
173-
resolved := t.Status==STATUS_RESOLVED
171+
active := t.Status == STATUS_ACTIVE
172+
paused := t.Status == STATUS_PAUSED
173+
resolved := t.Status == STATUS_RESOLVED
174174

175175
getFg := func(normalColor, activeColor int) int {
176176
if active {
@@ -179,10 +179,10 @@ func (t *Task) Style() RowStyle {
179179
return normalColor
180180
}
181181

182-
if !t.Due.IsZero() && t.Due.Before(now) && !resolved {
182+
if t.Priority == PRIORITY_CRITICAL {
183+
style.Fg = getFg(FG_PRIORITY_CRITICAL, FG_ACTIVE_PRIORITY_CRITICAL)
184+
} else if !t.Due.IsZero() && t.Due.Before(now) && !resolved {
183185
style.Fg = getFg(FG_PRIORITY_HIGH, FG_ACTIVE_PRIORITY_HIGH)
184-
} else if t.Priority == PRIORITY_CRITICAL {
185-
style.Fg = getFg(FG_PRIORITY_CRITICAL,FG_ACTIVE_PRIORITY_CRITICAL)
186186
} else if t.Priority == PRIORITY_HIGH {
187187
style.Fg = getFg(FG_PRIORITY_HIGH, FG_ACTIVE_PRIORITY_HIGH)
188188
} else if t.Priority == PRIORITY_LOW {

0 commit comments

Comments
 (0)