Skip to content

Commit

Permalink
check for testing api level in HasTestingVersion() instead
Browse files Browse the repository at this point in the history
  • Loading branch information
goaaats committed Jul 3, 2024
1 parent a4a3318 commit 8d08f46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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<DalamudConfiguration>.Get();
var pluginManager = Service<PluginManager>.Get();

var hasTestingVersionAvailable = configuration.DoPluginTest &&
PluginManager.HasTestingVersion(manifest) &&
manifest.TestingDalamudApiLevel == effectiveApiLevel;
PluginManager.HasTestingVersion(manifest);

if (ImGui.BeginPopupContextItem("ItemContextMenu"))
{
Expand Down
3 changes: 2 additions & 1 deletion Dalamud/Plugin/Internal/PluginManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ public static bool HasTestingVersion(IPluginManifest manifest)

if (hasTv)
{
return tv > av;
return tv > av &&
manifest.TestingDalamudApiLevel == DalamudApiLevel;
}

return false;
Expand Down

0 comments on commit 8d08f46

Please sign in to comment.