mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Pass ui parameter to all collate item_funcs
This commit is contained in:
@@ -183,7 +183,7 @@ function FileChooser:getListItem(dirpath, f, fullpath, attributes, collate)
|
|||||||
item.text = item.text.."/"
|
item.text = item.text.."/"
|
||||||
item.bidi_wrap_func = BD.directory
|
item.bidi_wrap_func = BD.directory
|
||||||
if collate.can_collate_mixed and collate.item_func ~= nil then -- used by user plugin/patch, don't remove
|
if collate.can_collate_mixed and collate.item_func ~= nil then -- used by user plugin/patch, don't remove
|
||||||
collate.item_func(item)
|
collate.item_func(item, self.ui)
|
||||||
end
|
end
|
||||||
if dirpath then -- file browser or PathChooser
|
if dirpath then -- file browser or PathChooser
|
||||||
item.mandatory = self:getMenuItemMandatory(item)
|
item.mandatory = self:getMenuItemMandatory(item)
|
||||||
|
|||||||
@@ -22,10 +22,7 @@ local PathChooser = FileChooser:extend{
|
|||||||
}
|
}
|
||||||
|
|
||||||
function PathChooser:init()
|
function PathChooser:init()
|
||||||
local collate = G_reader_settings:readSetting("collate")
|
self.ui = require("apps/reader/readerui").instance or require("apps/filemanager/filemanager").instance
|
||||||
if self.show_files and (collate == "title" or collate == "authors" or collate == "series" or collate == "keywords") then
|
|
||||||
self.ui = require("apps/reader/readerui").instance or require("apps/filemanager/filemanager").instance
|
|
||||||
end
|
|
||||||
|
|
||||||
if self.title == true then -- default title depending on options
|
if self.title == true then -- default title depending on options
|
||||||
if self.select_directory and not self.select_file then
|
if self.select_directory and not self.select_file then
|
||||||
|
|||||||
Reference in New Issue
Block a user