From e280fb657f1f63b3c8a7b197609f22a7e123d1d1 Mon Sep 17 00:00:00 2001 From: hius07 <62179190+hius07@users.noreply.github.com> Date: Fri, 27 Jun 2025 14:06:52 +0300 Subject: [PATCH] gestures plugin: fix menu refreshing on check --- plugins/gestures.koplugin/main.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/gestures.koplugin/main.lua b/plugins/gestures.koplugin/main.lua index 199b36b2c..d0e3e4081 100644 --- a/plugins/gestures.koplugin/main.lua +++ b/plugins/gestures.koplugin/main.lua @@ -295,11 +295,10 @@ function Gestures:genMenu(ges) if gestures_list[ges] ~= nil then table.insert(sub_items, { text = T(_("%1 (default)"), Dispatcher:menuTextFunc(self.defaults[ges])), - keep_menu_open = true, - no_refresh_on_check = true, checked_func = function() return util.tableEquals(self.gestures[ges], self.defaults[ges]) end, + on_check_updated_in_callback = true, callback = function(touchmenu_instance) local function do_remove() self.gestures[ges] = util.tableDeepCopy(self.defaults[ges]) @@ -313,11 +312,10 @@ function Gestures:genMenu(ges) end table.insert(sub_items, { text = _("Pass through"), - keep_menu_open = true, - no_refresh_on_check = true, checked_func = function() return self.gestures[ges] == nil end, + on_check_updated_in_callback = true, callback = function(touchmenu_instance) local function do_remove() self.gestures[ges] = nil