mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
textviewer: add close_callback
This commit is contained in:
@@ -118,7 +118,7 @@ function TextViewer:init()
|
||||
{
|
||||
text = _("Close"),
|
||||
callback = function()
|
||||
UIManager:close(self)
|
||||
self:onClose()
|
||||
end,
|
||||
},
|
||||
},
|
||||
@@ -217,6 +217,9 @@ end
|
||||
|
||||
function TextViewer:onClose()
|
||||
UIManager:close(self)
|
||||
if self.close_callback then
|
||||
self.close_callback()
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user