Fix footer, stats, TOC position with cre in scroll mode (#3304)

This gives the page position to these modules even in scroll mode.
Also, in readerrolling: don't query battery/charging status
when crengine does not need it (used only when it shows its top
progress bar).
This commit is contained in:
poire-z
2017-10-05 21:49:59 +02:00
committed by Frans de Jonge
parent ac7119c433
commit b483c54be8
4 changed files with 27 additions and 4 deletions

View File

@@ -568,9 +568,14 @@ function ReaderFooter:onPageUpdate(pageno)
self:updateFooterPage()
end
function ReaderFooter:onPosUpdate(pos)
function ReaderFooter:onPosUpdate(pos, pageno)
self.position = pos
self.doc_height = self.view.document.info.doc_height
if pageno then
self.pageno = pageno
self.pages = self.view.document:getPageCount()
self.ui.doc_settings:saveSetting("doc_pages", self.pages) -- for Book information
end
self:updateFooterPos()
end