check for testing api level in HasTestingVersion() instead

This commit is contained in:
goat 2024-07-03 12:20:38 +02:00
parent a4a3318a6e
commit 8d08f46fd7
2 changed files with 5 additions and 5 deletions

View file

@ -2274,7 +2274,7 @@ internal class PluginInstallerWindow : Window, IDisposable
if (useTesting || manifest.IsTestingExclusive) if (useTesting || manifest.IsTestingExclusive)
flags |= PluginHeaderFlags.IsTesting; 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) if (!wasSeen)
configuration.SeenPluginInternalName.Add(manifest.InternalName); configuration.SeenPluginInternalName.Add(manifest.InternalName);
@ -2352,14 +2352,13 @@ internal class PluginInstallerWindow : Window, IDisposable
ImGui.PopID(); ImGui.PopID();
} }
private void DrawAvailablePluginContextMenu(RemotePluginManifest manifest, int effectiveApiLevel) private void DrawAvailablePluginContextMenu(RemotePluginManifest manifest)
{ {
var configuration = Service<DalamudConfiguration>.Get(); var configuration = Service<DalamudConfiguration>.Get();
var pluginManager = Service<PluginManager>.Get(); var pluginManager = Service<PluginManager>.Get();
var hasTestingVersionAvailable = configuration.DoPluginTest && var hasTestingVersionAvailable = configuration.DoPluginTest &&
PluginManager.HasTestingVersion(manifest) && PluginManager.HasTestingVersion(manifest);
manifest.TestingDalamudApiLevel == effectiveApiLevel;
if (ImGui.BeginPopupContextItem("ItemContextMenu")) if (ImGui.BeginPopupContextItem("ItemContextMenu"))
{ {

View file

@ -281,7 +281,8 @@ internal class PluginManager : IInternalDisposableService
if (hasTv) if (hasTv)
{ {
return tv > av; return tv > av &&
manifest.TestingDalamudApiLevel == DalamudApiLevel;
} }
return false; return false;