feat: check plugin load state after installing

This commit is contained in:
goat 2021-08-16 22:35:22 +02:00
parent a03db8b35d
commit bc54bc83f3
No known key found for this signature in database
GPG key ID: F18F057873895461
2 changed files with 14 additions and 4 deletions

View file

@ -689,7 +689,15 @@ namespace Dalamud.Interface.Internal.Windows
this.installStatus = OperationStatus.Idle;
if (this.DisplayErrorContinuation(task, Locs.ErrorModal_InstallFail(manifest.Name)))
{
this.dalamud.InterfaceManager.Notifications.AddNotification($"The plugin {manifest.Name} was successfully installed.", "Plugin installed!", Notifications.Notification.Type.Success);
if (task.Result.State == PluginState.Loaded)
{
this.dalamud.InterfaceManager.Notifications.AddNotification($"The plugin {manifest.Name} was successfully installed.", "Plugin installed!", Notifications.Notification.Type.Success);
}
else
{
this.dalamud.InterfaceManager.Notifications.AddNotification($"The plugin {manifest.Name} failed to load.", "Plugin not installed!", Notifications.Notification.Type.Error);
this.ShowErrorModal(Locs.ErrorModal_InstallFail(manifest.Name));
}
}
});
}