@@ -51,9 +51,15 @@ function Notifications:notify(time)
51
51
52
52
local result = {}
53
53
for _ , task in ipairs (tasks ) do
54
+ local todo
55
+ if task .todo ~= nil then
56
+ todo = task .todo
57
+ else
58
+ todo = ' '
59
+ end
54
60
utils .concat (result , {
55
61
string.format (' # %s (%s)' , task .category , task .humanized_duration ),
56
- string.format (' %s %s %s' , string.rep (' *' , task .level ), task . todo , task .title ),
62
+ string.format (' %s %s %s' , string.rep (' *' , task .level ), todo , task .title ),
57
63
string.format (' %s: <%s>' , task .type , task .time :to_string ()),
58
64
})
59
65
end
76
82
--- @param tasks table[]
77
83
function Notifications :_cron_notifier (tasks )
78
84
for _ , task in ipairs (tasks ) do
85
+ local todo
86
+ if task .todo ~= nil then
87
+ todo = task .todo
88
+ else
89
+ todo = ' '
90
+ end
79
91
local title = string.format (' %s (%s)' , task .category , task .humanized_duration )
80
- local subtitle = string.format (' %s %s %s' , string.rep (' *' , task .level ), task . todo , task .title )
92
+ local subtitle = string.format (' %s %s %s' , string.rep (' *' , task .level ), todo , task .title )
81
93
local date = string.format (' %s: %s' , task .type , task .time :to_string ())
82
94
83
95
if vim .fn .executable (' notify-send' ) == 1 then
0 commit comments