[Hotkeys] refactor hotkey list and update callbacks#13219
Conversation
919798f to
adca6d8
Compare
Except snake_cased_callbacks. |
Frenzie
left a comment
There was a problem hiding this comment.
There's no need for comments that just repeat what's on the line right below.
| separator = true, | ||
| checked_func = function() | ||
| return self.hotkeys[hotkey] == nil | ||
| -- Return true if no hotkey exists, or if the hotkey exists but has no dispatcher settings |
There was a problem hiding this comment.
| -- Return true if no hotkey exists, or if the hotkey exists but has no dispatcher settings |
| end | ||
| if self.hotkeys[hotkey] and next(self.hotkeys[hotkey]) then | ||
| Dispatcher.removeActions(self.hotkeys[hotkey], do_remove) | ||
| else -- If no actions are selected, just update the defaults |
There was a problem hiding this comment.
| else -- If no actions are selected, just update the defaults |
There was a problem hiding this comment.
I assume you are suggesting I remove the comment, not the else
There was a problem hiding this comment.
because if you are suggesting I remove the else I encourage you to try it on you device and see what happens without it.
There was a problem hiding this comment.
Like I said, comments that just say what's happening are rarely useful. :-)
|
just to be very clear one more time, there are two bugs, one is NT-specific described here #13078 (comment), and the other with Gestures not allowing you to select "Nothing" or "Pass trough" or "defaults" under certain circumstances. |
what's new
FFIUtiltoffiUtilto maintain a consistent naming convention across the code base.no_refresh_on_checkproperty to menu items to prevent unnecessary refreshes when checking the items.callbackfunctions in the hotkeys menu to include atouchmenu_instanceparameter and handle the removal of actions more gracefully. This ensures the menu items are updated correctly after changes.bug report
there is a problem with the callbacks introduced (in the gestures plugin) in #13078, I believe the solution is doing exactly what I am doing here (the if/else bit), but await instructions to see if I should do it here.
This change is