Revert "fix(PluginManager): re-aggregate old and current manifests in DetectAvailablePluginUpdates() (closes #409)"

This reverts commit efdadc6c
This commit is contained in:
goat 2021-07-15 15:20:27 +02:00
parent efdadc6c35
commit ada0cf060d
No known key found for this signature in database
GPG key ID: F18F057873895461

View file

@ -800,24 +800,15 @@ namespace Dalamud.Plugin.Internal
{
var updatablePlugins = new List<AvailablePluginUpdate>();
if (!this.ReposReady)
throw new Exception("Plugin updates can only be detected when repos are available.");
// Collect all outdated and current plugin manifests
var remoteManifests =
this.Repos.SelectMany(x => x.PluginMaster).Where(x => x.DalamudApiLevel <= DalamudApiLevel).ToList();
for (var i = 0; i < this.installedPlugins.Count; i++)
{
var plugin = this.installedPlugins[i];
Log.Debug($"Checking plugin updates for {plugin.Manifest.InternalName}");
var installedVersion = plugin.IsTesting
? plugin.Manifest.TestingAssemblyVersion
: plugin.Manifest.AssemblyVersion;
var updates = remoteManifests
var updates = this.availablePlugins
.Where(remoteManifest => plugin.Manifest.InternalName == remoteManifest.InternalName)
.Select(remoteManifest =>
{
@ -827,8 +818,6 @@ namespace Dalamud.Plugin.Internal
: remoteManifest.AssemblyVersion;
var isUpdate = candidateVersion > installedVersion;
Log.Debug($" => {remoteManifest.InternalName} from {remoteManifest.SourceRepo.PluginMasterUrl} - candidate: {candidateVersion} installed: {installedVersion}");
return (isUpdate, useTesting, candidateVersion, remoteManifest);
})
.Where(tpl => tpl.isUpdate)