mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Fix default not being used for View mode and Progress bar
Default setting set by holding on the bottom config buttons for "View mode" (scroll/page) and "Progress bar" (full/mini) were not used. Also, when switching Progress bar from 'full' to 'mini', show the mini bar again.
This commit is contained in:
@@ -692,14 +692,25 @@ function ReaderFooter:onHoldFooter()
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderFooter:onSetStatusLine(status_line)
|
||||
function ReaderFooter:onSetStatusLine(status_line, on_read_settings)
|
||||
-- Ignore this event when it is first sent by ReaderCoptListener
|
||||
-- on book loading, so we stay with the saved footer settings
|
||||
if on_read_settings then
|
||||
return
|
||||
end
|
||||
-- 1 is min progress bar while 0 is full cre header progress bar
|
||||
if status_line == 1 then
|
||||
-- If footer was off (if previously with full status bar), make the
|
||||
-- footer visible, as if we taped on it (and so we don't duplicate
|
||||
-- this code - not if flipping_visible as in this case, a ges.pos
|
||||
-- argument to onTapFooter(ges) is required)
|
||||
if self.mode == MODE.off and not self.view.flipping_visible then
|
||||
self:onTapFooter()
|
||||
end
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user