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

Prove CREReader:showMenu() method because the generic

UniReader:showMenu() method invokes :cleanCache() method which is
non-existent for CREReader object and causes a crash if you press C
after pressing Menu while viewing any of crereader-handled files (fb2,
epub, etc.)
This commit is contained in:
Tigran Aivazian 2012-09-22 09:40:13 +01:00
parent 3056bf440c
commit de96f30eff

View File

@ -405,6 +405,20 @@ function CREReader:_drawReadingInfo()
blitbuffer.progressBar(fb.bb, 10, ypos, G_width - 20, 15, 5, 4, load_percent/100, 8)
end
function UniReader:showMenu()
self:_drawReadingInfo()
fb:refresh(1)
while true do
local ev = input.saveWaitForEvent()
ev.code = adjustKeyEvents(ev)
if ev.type == EV_KEY and ev.value == EVENT_VALUE_KEY_PRESS then
if ev.code == KEY_BACK or ev.code == KEY_MENU then
return
end
end
end
end
function CREReader:adjustCreReaderCommands()
-- delete commands
self.commands:delGroup("[joypad]")