Plugin info - Implemented property changed

Plugins - Improved enable failure detection
Plugins UI - Show an indicator on plugins that failed to enable
Plugins UI - Show a progress indicator on plugins that are enabling
UI - Added reusable Snackbar (not the Dutch kind with kroketten)
This commit is contained in:
Robert committed 2020-06-25 13:25:15 +02:00
1 parent 3e937f6256
commit 8215440fac
18 files changed
+399 -179

No files matched your search

+18 -1
View File
@@ -52,13 +52,30 @@ namespace Artemis.Core.Plugins.Abstract
if (enable && !Enabled)
{
Enabled = true;
EnablePlugin();
PluginInfo.Enabled = true;
// If enable failed, put it back in a disabled state
try
{
EnablePlugin();
}
catch
{
Enabled = false;
PluginInfo.Enabled = false;
throw;
}
OnPluginEnabled();
}
else if (!enable && Enabled)
{
Enabled = false;
PluginInfo.Enabled = false;
// Even if disable failed, still leave it in a disabled state to avoid more issues
DisablePlugin();
OnPluginDisabled();
}
}