ci: format
This commit is contained in:
parent
1472b2f333
commit
fb633294dc
3 changed files with 25 additions and 10 deletions
|
|
@ -1192,7 +1192,10 @@ function M.archive(arg)
|
|||
log.debug(('archive: days=%d cutoff=%s total_tasks=%d'):format(days, cutoff, #tasks))
|
||||
local count = 0
|
||||
for _, task in ipairs(tasks) do
|
||||
if (task.status == 'done' or task.status == 'deleted' or task.status == 'cancelled') and task['end'] then
|
||||
if
|
||||
(task.status == 'done' or task.status == 'deleted' or task.status == 'cancelled')
|
||||
and task['end']
|
||||
then
|
||||
if task['end'] < cutoff then
|
||||
count = count + 1
|
||||
end
|
||||
|
|
@ -1213,7 +1216,10 @@ function M.archive(arg)
|
|||
function()
|
||||
local kept = {}
|
||||
for _, task in ipairs(tasks) do
|
||||
if (task.status == 'done' or task.status == 'deleted' or task.status == 'cancelled') and task['end'] then
|
||||
if
|
||||
(task.status == 'done' or task.status == 'deleted' or task.status == 'cancelled')
|
||||
and task['end']
|
||||
then
|
||||
if task['end'] < cutoff then
|
||||
goto skip
|
||||
end
|
||||
|
|
|
|||
|
|
@ -275,9 +275,9 @@ function M.category_view(tasks)
|
|||
category = cat,
|
||||
priority = task.priority,
|
||||
overdue = task.status ~= 'done'
|
||||
and task.status ~= 'cancelled'
|
||||
and task.due ~= nil
|
||||
and parse.is_overdue(task.due)
|
||||
and task.status ~= 'cancelled'
|
||||
and task.due ~= nil
|
||||
and parse.is_overdue(task.due)
|
||||
or nil,
|
||||
recur = task.recur,
|
||||
forge_spans = compute_forge_spans(task, prefix_len),
|
||||
|
|
@ -332,9 +332,9 @@ function M.priority_view(tasks)
|
|||
category = task.category,
|
||||
priority = task.priority,
|
||||
overdue = task.status ~= 'done'
|
||||
and task.status ~= 'cancelled'
|
||||
and task.due ~= nil
|
||||
and parse.is_overdue(task.due)
|
||||
and task.status ~= 'cancelled'
|
||||
and task.due ~= nil
|
||||
and parse.is_overdue(task.due)
|
||||
or nil,
|
||||
show_category = true,
|
||||
recur = task.recur,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue