File tree 1 file changed +6
-1
lines changed
lua/neowarrior/components
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
local TaskLine = require (' neowarrior.lines.TaskLine' )
2
2
local util = require (' neowarrior.util' )
3
+ local colors = require (' neowarrior.colors' )
3
4
4
5
--- @class AgendaComponent
5
6
local AgendaComponent = {}
@@ -68,9 +69,13 @@ function AgendaComponent:_set(tasks)
68
69
})
69
70
self .tram :into_line ({})
70
71
72
+ table.sort (date .tasks , function (a , b ) return a .due < b .due end )
73
+
71
74
for _ , task in ipairs (date .tasks ) do
72
75
73
- self .tram :col (task .due_dt :format (' %H:%M' ) .. " : " , { color = _Neowarrior .config .colors .dim .group })
76
+ local time_color = colors .get_due_color (task .due_dt :diff_hours ())
77
+ self .tram :col (task .due_dt :format (' %H:%M' ), { color = time_color })
78
+ self .tram :col (" : " , {})
74
79
TaskLine :new (self .tram , task ):into_line ({
75
80
disable_due = true ,
76
81
})
You can’t perform that action at this time.
0 commit comments