Fix race condition in plugin load

When opening the installer while boot plugins are still loaded, it may have been possible for plugins to be added to the installed plugins list twice, causing various statekeeping issues
This commit is contained in:
goaaats 2025-04-24 21:58:54 +02:00
parent 096f9c3e52
commit e29171cc99
6 changed files with 83 additions and 82 deletions

View file

@ -283,7 +283,7 @@ internal class PluginInstallerWindow : Window, IDisposable
var pluginManager = Service<PluginManager>.Get();
_ = pluginManager.ReloadPluginMastersAsync();
Service<PluginManager>.Get().ScanDevPlugins();
_ = pluginManager.ScanDevPluginsAsync();
if (!this.isSearchTextPrefilled)
{
@ -782,7 +782,7 @@ internal class PluginInstallerWindow : Window, IDisposable
ImGui.SameLine();
if (ImGui.Button(Locs.FooterButton_ScanDevPlugins))
{
pluginManager.ScanDevPlugins();
_ = pluginManager.ScanDevPluginsAsync();
}
}