readerfooter(fix): avoid setting mini footer to invisible when full progress bar is on

Our previous assumption is user will only choose between full or min
bar. The does not hold anymore as many more info has been added to the
mini bar and sometimes user might want to have both of them on. This
patch makes the reader behavior consistent when both bars are set to be
on for a document.
This commit is contained in:
Qingping Hou
2016-07-23 17:57:29 -07:00
parent 06bd4d7afc
commit 1c5543358c
3 changed files with 32 additions and 4 deletions

View File

@@ -314,7 +314,7 @@ function ReaderFooter:updateFooterPos()
end
-- updateFooterText will start as a noop. After onReaderReady event is
-- received, it will initialized as _updateFooterText
-- received, it will initialized as _updateFooterText below
function ReaderFooter:updateFooterText()
end
@@ -484,7 +484,12 @@ function ReaderFooter:onHoldFooter(arg, ges)
end
function ReaderFooter:onSetStatusLine(status_line)
self.view.footer_visible = (status_line == 1)
-- 1 is min progress bar while 0 is full cre header progress bar
if status_line == 1 then
self.view.footer_visible = (self.mode ~= MODE.off)
else
self:applyFooterMode(MODE.off)
end
self.ui.document:setStatusLineProp(status_line)
self.ui:handleEvent(Event:new("UpdatePos"))
end