mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
slight refactoring of filechooser so it remembers state
This commit is contained in:
@@ -74,8 +74,9 @@ width, height = fb:getSize()
|
||||
|
||||
if lfs.attributes(ARGV[optind], "mode") == "directory" then
|
||||
local running = true
|
||||
FileChooser:setPath(ARGV[optind])
|
||||
while running do
|
||||
local pdffile = FileChooser:choose(ARGV[optind],0,height)
|
||||
local pdffile = FileChooser:choose(0,height)
|
||||
if pdffile ~= nil then
|
||||
PDFReader:open(pdffile,"") -- TODO: query for password
|
||||
PDFReader:goto(tonumber(PDFReader.settings:readsetting("last_page") or 1))
|
||||
|
||||
Reference in New Issue
Block a user