|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
local InputContainer = require("ui/widget/container/inputcontainer")
|
|
|
|
|
local CenterContainer = require("ui/widget/container/centercontainer")
|
|
|
|
|
local ButtonDialog = require("ui/widget/buttondialog")
|
|
|
|
|
local ReaderUI = require("apps/reader/readerui")
|
|
|
|
|
local lfs = require("libs/libkoreader-lfs")
|
|
|
|
|
local UIManager = require("ui/uimanager")
|
|
|
|
|
local DocSettings = require("docsettings")
|
|
|
|
@ -83,7 +84,10 @@ function FileManagerHistory:updateItemTable()
|
|
|
|
|
for f in lfs.dir(history_dir) do
|
|
|
|
|
local path = history_dir..f
|
|
|
|
|
if lfs.attributes(path, "mode") == "file" then
|
|
|
|
|
table.insert(sorted_files, {file = f, date = lfs.attributes(path, "modification")})
|
|
|
|
|
table.insert(sorted_files, {
|
|
|
|
|
file = f,
|
|
|
|
|
date = lfs.attributes(path, "modification")
|
|
|
|
|
})
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
table.sort(sorted_files, function(v1,v2) return v1.date > v2.date end)
|
|
|
|
@ -104,7 +108,7 @@ function FileManagerHistory:updateItemTable()
|
|
|
|
|
text = v.name,
|
|
|
|
|
histfile = v.histfile,
|
|
|
|
|
callback = function()
|
|
|
|
|
showReaderUI(v.dir .. "/" .. v.name)
|
|
|
|
|
ReaderUI:showReader(v.dir .. "/" .. v.name)
|
|
|
|
|
end
|
|
|
|
|
})
|
|
|
|
|
end
|
|
|
|
|