mirror of
https://github.com/koreader/koreader.git
synced 2025-12-24 12:14:05 +01:00
ReaderLink: Minor logic simplification in onGoToPageLink (#9987)
Abort earlier if the nearest link is too far, instead of computing stuff and creating an object we'll never actually use. Includes minor logging tweaks to vaguely related codepaths ;p.
This commit is contained in:
@@ -816,7 +816,7 @@ function ReaderRolling:onRestoreBookLocation(saved_location)
|
||||
end
|
||||
|
||||
function ReaderRolling:onGotoViewRel(diff)
|
||||
logger.dbg("goto relative screen:", diff, ", in mode:", self.view.view_mode)
|
||||
logger.dbg("goto relative screen:", diff, "in mode:", self.view.view_mode)
|
||||
if self.view.view_mode == "scroll" then
|
||||
local footer_height = ((self.view.footer_visible and not self.view.footer.settings.reclaim_height) and 1 or 0) * self.view.footer:getHeight()
|
||||
local page_visible_height = self.ui.dimen.h - footer_height
|
||||
|
||||
Reference in New Issue
Block a user