mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Allow F5 key to reload document
This commit is contained in:
@@ -122,6 +122,7 @@ function ReaderUI:init()
|
||||
|
||||
if Device:hasKeys() then
|
||||
self.key_events.Home = { {"Home"}, doc = "open file browser" }
|
||||
self.key_events.Reload = { {"F5"}, doc = "reload document" }
|
||||
end
|
||||
|
||||
-- a view container (so it must be child #1!)
|
||||
@@ -811,6 +812,10 @@ function ReaderUI:onHome()
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderUI:onReload()
|
||||
self:reloadDocument()
|
||||
end
|
||||
|
||||
function ReaderUI:reloadDocument(after_close_callback)
|
||||
local file = self.document.file
|
||||
local provider = getmetatable(self.document).__index
|
||||
|
||||
Reference in New Issue
Block a user