From 8d08f46fd7494259fb63de93cc931ae1996201bc Mon Sep 17 00:00:00 2001 From: goat Date: Wed, 3 Jul 2024 12:20:38 +0200 Subject: [PATCH] check for testing api level in HasTestingVersion() instead --- .../Windows/PluginInstaller/PluginInstallerWindow.cs | 7 +++---- Dalamud/Plugin/Internal/PluginManager.cs | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs index ed0d96f9b3..b0c1e0b5f1 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs @@ -2274,7 +2274,7 @@ private void DrawAvailablePlugin(RemotePluginManifest manifest, int index) if (useTesting || manifest.IsTestingExclusive) flags |= PluginHeaderFlags.IsTesting; - if (this.DrawPluginCollapsingHeader(label, null, manifest, flags, () => this.DrawAvailablePluginContextMenu(manifest, effectiveApiLevel), index)) + if (this.DrawPluginCollapsingHeader(label, null, manifest, flags, () => this.DrawAvailablePluginContextMenu(manifest), index)) { if (!wasSeen) configuration.SeenPluginInternalName.Add(manifest.InternalName); @@ -2352,14 +2352,13 @@ private void DrawAvailablePlugin(RemotePluginManifest manifest, int index) ImGui.PopID(); } - private void DrawAvailablePluginContextMenu(RemotePluginManifest manifest, int effectiveApiLevel) + private void DrawAvailablePluginContextMenu(RemotePluginManifest manifest) { var configuration = Service.Get(); var pluginManager = Service.Get(); var hasTestingVersionAvailable = configuration.DoPluginTest && - PluginManager.HasTestingVersion(manifest) && - manifest.TestingDalamudApiLevel == effectiveApiLevel; + PluginManager.HasTestingVersion(manifest); if (ImGui.BeginPopupContextItem("ItemContextMenu")) { diff --git a/Dalamud/Plugin/Internal/PluginManager.cs b/Dalamud/Plugin/Internal/PluginManager.cs index 1d15e7ef21..f440ae542f 100644 --- a/Dalamud/Plugin/Internal/PluginManager.cs +++ b/Dalamud/Plugin/Internal/PluginManager.cs @@ -281,7 +281,8 @@ public static bool HasTestingVersion(IPluginManifest manifest) if (hasTv) { - return tv > av; + return tv > av && + manifest.TestingDalamudApiLevel == DalamudApiLevel; } return false;