fix: avoid initializing readerfooter multiple times

This will create multiple autoRefreshTime function and crash the reader on exit
This commit is contained in:
Qingping Hou
2016-03-07 22:42:46 -08:00
parent ada373e247
commit 1ede9d03f1
4 changed files with 50 additions and 26 deletions

View File

@@ -19,6 +19,11 @@ function ReaderFlipping:init()
dimen = Geom:new{w = Screen:getWidth(), h = widget:getSize().h},
widget,
}
self:resetLayout()
end
function ReaderFlipping:resetLayout()
self[1].dimen.w = Screen:getWidth()
if Device:isTouchDevice() then
self.ges_events = {
Tap = {