feat(views): add recurrence to LineMeta
Problem: LineMeta does not carry recurrence info, so the buffer layer cannot display recurrence indicators. Solution: add recur field to LineMeta and populate it in both category_view() and priority_view().
This commit is contained in:
parent
b08d01fe78
commit
1e2d72914c
2 changed files with 51 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ local config = require('pending.config')
|
|||
---@field overdue? boolean
|
||||
---@field show_category? boolean
|
||||
---@field priority? integer
|
||||
---@field recur? string
|
||||
|
||||
---@class pending.views
|
||||
local M = {}
|
||||
|
|
@ -149,6 +150,7 @@ function M.category_view(tasks)
|
|||
status = task.status,
|
||||
category = cat,
|
||||
overdue = task.status == 'pending' and task.due ~= nil and task.due < today or nil,
|
||||
recur = task.recur,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
@ -200,6 +202,7 @@ function M.priority_view(tasks)
|
|||
category = task.category,
|
||||
overdue = task.status == 'pending' and task.due ~= nil and task.due < today or nil,
|
||||
show_category = true,
|
||||
recur = task.recur,
|
||||
})
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue