Version log and (limited) notifications log (#10178)

This PR will close #1257 and #3418.
This commit is contained in:
zwim
2023-03-05 15:21:56 +01:00
committed by GitHub
parent 9f37863f00
commit efd2df6f05
4 changed files with 87 additions and 2 deletions

View File

@@ -1,4 +1,6 @@
local Notification = require("ui/widget/notification")
local TextViewer = require("ui/widget/textviewer")
local UIManager = require("ui/uimanager")
local _ = require("gettext")
local band = bit.band
@@ -76,5 +78,26 @@ This allows selecting which to show or hide.]]),
end,
separator = true,
},
{
text = _("Show past notifications"),
callback = function()
local content = require("ui/widget/notification"):getPastMessages()
if not content or #content == 0 then
content = _("No notifications available.")
else
content = table.concat(content, "\n")
end
local textviewer
textviewer = TextViewer:new{
title = _("Past notifications"),
text = content,
justified = false,
}
UIManager:show(textviewer)
end,
keep_menu_open = true,
},
}
}