From c050e2da1ca23af46d14340fdce736dad4628c6b Mon Sep 17 00:00:00 2001 From: kalilistic <35899782+kalilistic@users.noreply.github.com> Date: Sun, 28 Mar 2021 23:50:24 -0400 Subject: [PATCH] fix dupe plugin listings --- Dalamud/Plugin/PluginInstallerWindow.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dalamud/Plugin/PluginInstallerWindow.cs b/Dalamud/Plugin/PluginInstallerWindow.cs index 523033afb..1ccd1002f 100644 --- a/Dalamud/Plugin/PluginInstallerWindow.cs +++ b/Dalamud/Plugin/PluginInstallerWindow.cs @@ -71,7 +71,8 @@ namespace Dalamud.Plugin return this.dalamud.PluginManager.Plugins.Where(x => x.Definition != null).Any( x => x.Definition.InternalName == def.InternalName); }) - .ToList(); + .GroupBy(x => new {x.InternalName, x.AssemblyVersion}) + .Select(y => y.First()).ToList(); this.pluginListInstalled.AddRange(hiddenPlugins); this.pluginListInstalled.Sort((x, y) => x.Name.CompareTo(y.Name)); @@ -80,7 +81,9 @@ namespace Dalamud.Plugin private void ResortPlugins() { var availableDefs = this.dalamud.PluginRepository.PluginMaster.Where( - x => this.pluginListInstalled.All(y => x.InternalName != y.InternalName)).ToList(); + x => this.pluginListInstalled.All(y => x.InternalName != y.InternalName)) + .GroupBy(x => new {x.InternalName, x.AssemblyVersion}) + .Select(y => y.First()).ToList(); switch (this.sortKind) { case PluginSortKind.Alphabetical: