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

This commit is contained in:
yparitcher authored and GitHub committed 2021-05-31 20:28:43 +02:00
1 parent d5a2df3c04
commit b30e366ccd
4 files changed
+17

No files matched your search

@@ -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