mod: factor last reading page saving and resotring

This commit is contained in:
Qingping Hou
2012-03-30 13:07:48 +08:00
parent 612890850c
commit 8a2b86e203
2 changed files with 25 additions and 17 deletions

View File

@@ -51,6 +51,7 @@ function openFile(filename)
if ok then
reader:loadSettings(filename)
page_num = reader.settings:readSetting("last_page") or 1
page_num = reader:getLastPageOrPos()
reader:goto(tonumber(page_num))
reader_settings:savesetting("lastfile", filename)
return reader:inputLoop()