feat(notifier): reverse notif history by default for show_history

This commit is contained in:
Folke Lemaitre 2024-12-01 09:30:19 +01:00
parent cb795513b3
commit 5a50738b8e
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -445,6 +445,10 @@ end
function N:show_history(opts)
local win = Snacks.win({ style = "notification.history", enter = true, show = false })
local buf = win:open_buf()
opts = opts or {}
if opts.reverse == nil then
opts.reverse = true
end
for _, notif in ipairs(self:get_history(opts)) do
N.styles.history(buf, notif, {
opts = win.opts,