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

reviewable/pr9167/r1
Utsob Roy 2 years ago committed by GitHub
parent 05d51997f1
commit c71167fc6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 {

Loading…
Cancel
Save