installer: always pick dev plugin first when collecting local plugins for available manifests

fixes a bug where the available and the installed plugin showed separately in the plugin list if the LocalDevPlugin of the same internalname was in it before the LocalPlugin
This commit is contained in:
goaaats 2024-03-19 22:43:48 +01:00
parent 639cb1ac33
commit 4e7531f703

View file

@ -1158,10 +1158,13 @@ internal class PluginInstallerWindow : Window, IDisposable
// Go through all AVAILABLE manifests, associate them with a NON-DEV local plugin, if one is available, and remove it from the pile
foreach (var availableManifest in this.categoryManager.GetCurrentCategoryContent(filteredAvailableManifests).Cast<RemotePluginManifest>())
{
var plugin = this.pluginListInstalled.FirstOrDefault(plugin => plugin.Manifest.InternalName == availableManifest.InternalName && plugin.Manifest.RepoUrl == availableManifest.RepoUrl);
var plugin = this.pluginListInstalled
.FirstOrDefault(plugin => plugin.Manifest.InternalName == availableManifest.InternalName &&
plugin.Manifest.RepoUrl == availableManifest.RepoUrl &&
!plugin.IsDev);
// We "consumed" this plugin from the pile and remove it.
if (plugin != null && !plugin.IsDev)
if (plugin != null)
{
installedPlugins.Remove(plugin);
proxies.Add(new PluginInstallerAvailablePluginProxy(null, plugin));