mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Grayed out Open last document
This commit is contained in:
committed by
Frans de Jonge
parent
40e19dbc37
commit
e07db0e7a0
@@ -239,6 +239,9 @@ function FileManagerMenu:setUpdateItemTable()
|
||||
-- insert common info
|
||||
table.insert(self.tab_item_table.main, {
|
||||
text = _("Open last document"),
|
||||
enabled_func = function()
|
||||
return G_reader_settings:readSetting("lastfile") ~= nil
|
||||
end,
|
||||
callback = function()
|
||||
local last_file = G_reader_settings:readSetting("lastfile")
|
||||
if not last_file or lfs.attributes(last_file, "mode") ~= "file" then
|
||||
|
||||
Reference in New Issue
Block a user