From 84cd057d39e769976a9ce71bbc4345154eaae61b Mon Sep 17 00:00:00 2001 From: Wim de With Date: Sun, 22 Jun 2025 15:01:51 +0200 Subject: [PATCH] Pass ui parameter to all collate item_funcs --- frontend/ui/widget/filechooser.lua | 2 +- frontend/ui/widget/pathchooser.lua | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/ui/widget/filechooser.lua b/frontend/ui/widget/filechooser.lua index 9add79163..41a2591a5 100644 --- a/frontend/ui/widget/filechooser.lua +++ b/frontend/ui/widget/filechooser.lua @@ -183,7 +183,7 @@ function FileChooser:getListItem(dirpath, f, fullpath, attributes, collate) item.text = item.text.."/" 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 - collate.item_func(item) + collate.item_func(item, self.ui) end if dirpath then -- file browser or PathChooser item.mandatory = self:getMenuItemMandatory(item) diff --git a/frontend/ui/widget/pathchooser.lua b/frontend/ui/widget/pathchooser.lua index eaec89a34..caae59adc 100644 --- a/frontend/ui/widget/pathchooser.lua +++ b/frontend/ui/widget/pathchooser.lua @@ -22,10 +22,7 @@ local PathChooser = FileChooser:extend{ } function PathChooser:init() - local collate = G_reader_settings:readSetting("collate") - 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 + self.ui = require("apps/reader/readerui").instance or require("apps/filemanager/filemanager").instance if self.title == true then -- default title depending on options if self.select_directory and not self.select_file then