mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
PathChooser: fetch 'show_hidden' setting on each use (#5923)
This commit is contained in:
@@ -67,7 +67,6 @@ function FileManagerShortcuts:addNewFolder()
|
||||
select_directory = true,
|
||||
select_file = false,
|
||||
path = self.fm_bookmark.curr_path,
|
||||
show_hidden = self.ui.file_chooser.show_hidden,
|
||||
onConfirm = function(path)
|
||||
local add_folder_input
|
||||
local friendly_name = util.basename(path) or _("my folder")
|
||||
|
||||
@@ -24,7 +24,6 @@ local PathChooser = FileChooser:extend{
|
||||
select_file = true, -- allow selecting files
|
||||
show_files = true, -- show files, even if select_files=false
|
||||
-- (directories are always shown, to allow navigation)
|
||||
show_hidden = G_reader_settings:readSetting("show_hidden"),
|
||||
detailed_file_info = false, -- show size and last mod time in Select message
|
||||
}
|
||||
|
||||
@@ -38,6 +37,7 @@ function PathChooser:init()
|
||||
self.title = _("Long-press to select")
|
||||
end
|
||||
end
|
||||
self.show_hidden = G_reader_settings:readSetting("show_hidden")
|
||||
if not self.show_files then
|
||||
self.file_filter = function() return false end -- filter out regular files
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user