[plugin] Exporter: add info messages with status (#9166)

This commit is contained in:
Utsob Roy
2022-06-04 13:37:26 +06:00
committed by GitHub
parent 05d51997f1
commit c71167fc6b

View File

@@ -177,13 +177,23 @@ function Exporter:exportClippings(clippings)
local export_callback = function()
UIManager:nextTick(function()
local timestamp = os.time()
local statuses = {}
for k, v in pairs(self.targets) do
if v:isEnabled() then
v.timestamp = timestamp
v:export(exportables)
local status = v:export(exportables)
if status then
table.insert(statuses, _(v.name .. ": Exported to " ) .. v:getFilePath(exportables))
else
table.insert(statuses, _(v.name .. ": Failed to export."))
end
v.timestamp = nil
end
end
UIManager:show(InfoMessage:new{
text = table.concat(statuses, "\n"),
timeout = 3,
})
end)
UIManager:show(InfoMessage:new {