ReaderLink: option to add location to stack on opening book (#7685)

This commit is contained in:
yparitcher
2021-05-31 14:28:43 -04:00
committed by GitHub
parent d5a2df3c04
commit b30e366ccd
4 changed files with 17 additions and 0 deletions

View File

@@ -90,6 +90,12 @@ function ReaderLink:init()
self.ui:registerPostInitCallback(function()
self.ui.menu:registerToMainMenu(self)
end)
if G_reader_settings:isTrue("opening_page_location_stack") then
-- Add location at book opening to stack
self.ui:registerPostReadyCallback(function()
self:addCurrentLocationToStack()
end)
end
-- For relative local file links
local directory, filename = util.splitFilePathName(self.ui.document.file) -- luacheck: no unused
self.document_dir = directory