From e8bf95dddc5ee73d600e64194541c414051fca18 Mon Sep 17 00:00:00 2001 From: hius07 <62179190+hius07@users.noreply.github.com> Date: Fri, 27 Jun 2025 14:08:03 +0300 Subject: [PATCH] profiles plugin: fix menu refreshing on check --- plugins/profiles.koplugin/main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/profiles.koplugin/main.lua b/plugins/profiles.koplugin/main.lua index af61e7dcc..69b0ee2f7 100644 --- a/plugins/profiles.koplugin/main.lua +++ b/plugins/profiles.koplugin/main.lua @@ -629,10 +629,10 @@ function Profiles:genAutoExecPathChangedMenuItem(text, event, profile_name, sepa local value = util.tableGetValue(self.autoexec, event, profile_name, condition) return value and txt .. ": " .. value or txt end, - no_refresh_on_check = true, checked_func = function() return util.tableGetValue(self.autoexec, event, profile_name, condition) end, + on_check_updated_in_callback = true, callback = function(touchmenu_instance) local dialog local buttons = {{ @@ -760,10 +760,10 @@ function Profiles:genAutoExecDocConditionalMenuItem(text, event, profile_name, s local txt = util.tableGetValue(self.autoexec, event, profile_name, condition, prop) return txt and title .. " " .. txt or title:sub(1, -2) end, - no_refresh_on_check = true, checked_func = function() return util.tableGetValue(self.autoexec, event, profile_name, condition, prop) and true end, + on_check_updated_in_callback = true, callback = function(touchmenu_instance) local dialog local buttons = self.document == nil and {} or {{ @@ -830,10 +830,10 @@ function Profiles:genAutoExecDocConditionalMenuItem(text, event, profile_name, s enabled_func = function() return not util.tableGetValue(self.autoexec, event_always, profile_name) end, - no_refresh_on_check = true, checked_func = function() return util.tableGetValue(self.autoexec, event, profile_name, conditions[3][2]) and true end, + on_check_updated_in_callback = true, callback = function(touchmenu_instance) local condition = conditions[3][2] local dialog @@ -895,10 +895,10 @@ function Profiles:genAutoExecDocConditionalMenuItem(text, event, profile_name, s enabled_func = function() return not util.tableGetValue(self.autoexec, event_always, profile_name) end, - no_refresh_on_check = true, checked_func = function() return util.tableGetValue(self.autoexec, event, profile_name, conditions[4][2]) and true end, + on_check_updated_in_callback = true, callback = function(touchmenu_instance) local condition = conditions[4][2] local collections = util.tableGetValue(self.autoexec, event, profile_name, condition)