2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00

Unify Home and Alt-Back commands for UniReader

The command handlers for Home and Alt-Back commands currently perform
exactly the same function (of closing the document) despite the help page
and even the Lua code suggesting otherwise, so it makes sense to merge
them into a single command handler.
This commit is contained in:
Tigran Aivazian 2012-11-20 10:19:39 +00:00
parent d3b0be1bf4
commit 72e0a314fb

View File

@ -3450,17 +3450,11 @@ function UniReader:addAllCommands()
self:redrawCurrentPage()
end
)
self.commands:add(KEY_BACK,MOD_ALT,"Back",
self.commands:addGroup(MOD_ALT.."Back, Home", {Keydef:new(KEY_BACK,MOD_ALT),Keydef:new(KEY_HOME,nil)},
"close document",
function(unireader)
return "break"
end)
self.commands:add(KEY_HOME,nil,"Home",
"exit application",
function(unireader)
keep_running = false
return "break"
end)
-- commands.map is very large, impacts startup performance on device
--Debug("defined commands "..dump(self.commands.map))
end