-
-
Notifications
You must be signed in to change notification settings - Fork 455
Fix PluginsManager context menu crashing #609
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add the contextdata in RequestUninstall
Flow.Launcher/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs
Lines 390 to 418 in 2777795
| var results = Context.API | |
| .GetAllPlugins() | |
| .Select(x => | |
| new Result | |
| { | |
| Title = $"{x.Metadata.Name} by {x.Metadata.Author}", | |
| SubTitle = x.Metadata.Description, | |
| IcoPath = x.Metadata.IcoPath, | |
| Action = e => | |
| { | |
| string message = string.Format( | |
| Context.API.GetTranslation("plugin_pluginsmanager_uninstall_prompt"), | |
| x.Metadata.Name, x.Metadata.Author, | |
| Environment.NewLine, Environment.NewLine); | |
| if (MessageBox.Show(message, | |
| Context.API.GetTranslation("plugin_pluginsmanager_uninstall_title"), | |
| MessageBoxButton.YesNo) == MessageBoxResult.Yes) | |
| { | |
| Application.Current.MainWindow.Hide(); | |
| Uninstall(x.Metadata); | |
| Context.API.RestartApp(); | |
| return true; | |
| } | |
| return false; | |
| } | |
| }); |
Because we are not creating results from UserPlugins object, it's going to require a whole lot of extra code to match up, bare in mind default plugins are not in the manifest list so it's not in the UserPlugins object. Just thought this is not so necessary to implement unless you feel otherwise. |
Co-authored-by: Kevin Zhang <[email protected]>
Yeah probably not that easy to do so. Leave it in the future if needed. |
Repro:
Going to any context menu other than pm install and select open website will get the exception pop up
Fix:
Tested: