textviewer: add close_callback

pull/9014/head
hius07 2 years ago committed by Frans de Jonge
parent af1251d83e
commit 428edf90bd

@ -118,7 +118,7 @@ function TextViewer:init()
{ {
text = _("Close"), text = _("Close"),
callback = function() callback = function()
UIManager:close(self) self:onClose()
end, end,
}, },
}, },
@ -217,6 +217,9 @@ end
function TextViewer:onClose() function TextViewer:onClose()
UIManager:close(self) UIManager:close(self)
if self.close_callback then
self.close_callback()
end
return true return true
end end

Loading…
Cancel
Save