Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability for shortcut action to be disabled instead of removed when unregistering #88

Open
Yoooi0 opened this issue Oct 11, 2022 · 0 comments
Assignees
Labels
major-task Enhacement or bug that requires major code changes maybe plugin

Comments

@Yoooi0
Copy link
Owner

Yoooi0 commented Oct 11, 2022

So that we can register/unregister actions dynamically without loosing configured actions in bindings.
Somehow need to be able to differentiate deprecated vs dynamic actions. Deprecate via migrations?

public void UnregisterAction(IShortcutActionDescriptor actionDescriptor)
{
AvailableActions.Remove(actionDescriptor);
_actionBuilders.Remove(actionDescriptor);
foreach (var (gesture, assignedActions) in Bindings)
foreach (var action in assignedActions.Where(a => actionDescriptor.Equals(a.Descriptor)).ToList())
assignedActions.Remove(action);
}

Also plugin registered actions will be lost each restart.

@Yoooi0 Yoooi0 self-assigned this Oct 11, 2022
@Yoooi0 Yoooi0 added the major-task Enhacement or bug that requires major code changes label Oct 22, 2022
@Yoooi0 Yoooi0 added the plugin label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-task Enhacement or bug that requires major code changes maybe plugin
Projects
None yet
Development

No branches or pull requests

1 participant