fix: lock plugin lists when sorting

This commit is contained in:
goat 2023-06-19 19:07:41 +02:00
parent a7426b7cb0
commit 418a2567a9
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
4 changed files with 143 additions and 75 deletions

View file

@ -292,7 +292,7 @@ public class ChatHandlers : IServiceType
if (chatGui == null || pluginManager == null || notifications == null)
return;
if (!pluginManager.ReposReady || pluginManager.InstalledPlugins.Count == 0 || pluginManager.AvailablePlugins.Count == 0)
if (!pluginManager.ReposReady || !pluginManager.InstalledPlugins.Any() || !pluginManager.AvailablePlugins.Any())
{
// Plugins aren't ready yet.
// TODO: We should retry. This sucks, because it means we won't ever get here again until another notice.
@ -311,7 +311,7 @@ public class ChatHandlers : IServiceType
return;
}
var updatedPlugins = task.Result;
var updatedPlugins = task.Result.ToList();
if (updatedPlugins.Any())
{
if (this.configuration.AutoUpdatePlugins)