Plugins - Don't load incompatible plugins

This commit is contained in:
Robert committed 2022-08-02 21:17:53 +02:00
1 parent dc17253518
commit 73a80ef476
4 files changed
+23 -11

No files matched your search

@@ -82,7 +82,13 @@ namespace Artemis.UI.Screens.Settings
try
{
Plugin plugin = _pluginManagementService.ImportPlugin(files[0]);
Plugin? plugin = _pluginManagementService.ImportPlugin(files[0]);
if (plugin == null)
{
await _windowService.ShowConfirmContentDialog("Failed to import plugin", "Make sure it is compatible with the current platform.", "Close", null);
return;
}
SearchPluginInput = plugin.Info.Name;
// Wait for the VM to be created asynchronously (it would be better to respond to some event here)