mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
mod: save jump_stack after exit
This commit is contained in:
@@ -35,7 +35,6 @@ longopts = {
|
||||
function openFile(filename)
|
||||
local file_type = string.lower(string.match(filename, ".+%.(.+)"))
|
||||
if file_type == "djvu" then
|
||||
print "haha"
|
||||
if DJVUReader:open(filename) then
|
||||
page_num = DJVUReader.settings:readsetting("last_page") or 1
|
||||
DJVUReader:goto(tonumber(page_num))
|
||||
|
||||
@@ -98,10 +98,15 @@ end
|
||||
function UniReader:loadSettings(filename)
|
||||
if self.doc ~= nil then
|
||||
self.settings = DocSettings:open(filename)
|
||||
|
||||
local gamma = self.settings:readsetting("gamma")
|
||||
if gamma then
|
||||
self.globalgamma = gamma
|
||||
end
|
||||
|
||||
local jumpstack = self.settings:readsetting("jumpstack")
|
||||
self.jump_stack = jumpstack or {}
|
||||
|
||||
return true
|
||||
end
|
||||
return false
|
||||
@@ -594,6 +599,7 @@ function UniReader:inputloop()
|
||||
if self.settings ~= nil then
|
||||
self.settings:savesetting("last_page", self.pageno)
|
||||
self.settings:savesetting("gamma", self.globalgamma)
|
||||
self.settings:savesetting("jumpstack", self.jump_stack)
|
||||
self.settings:close()
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user