mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix(pi): only show testing context menu if testing is on
This commit is contained in:
parent
a31a17018f
commit
4675d77a2d
1 changed files with 21 additions and 18 deletions
|
|
@ -2128,32 +2128,35 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
|
||||
if (ImGui.BeginPopupContextItem("InstalledItemContextMenu"))
|
||||
{
|
||||
var repoManifest = this.pluginListAvailable.FirstOrDefault(x => x.InternalName == plugin.Manifest.InternalName);
|
||||
if (repoManifest?.IsTestingExclusive == true)
|
||||
ImGui.BeginDisabled();
|
||||
|
||||
if (ImGui.MenuItem(Locs.PluginContext_TestingOptIn, string.Empty, optIn != null))
|
||||
if (configuration.DoPluginTest)
|
||||
{
|
||||
if (optIn != null)
|
||||
{
|
||||
configuration.PluginTestingOptIns!.Remove(optIn);
|
||||
var repoManifest = this.pluginListAvailable.FirstOrDefault(x => x.InternalName == plugin.Manifest.InternalName);
|
||||
if (repoManifest?.IsTestingExclusive == true)
|
||||
ImGui.BeginDisabled();
|
||||
|
||||
if (plugin.Manifest.TestingAssemblyVersion > repoManifest?.AssemblyVersion)
|
||||
if (ImGui.MenuItem(Locs.PluginContext_TestingOptIn, string.Empty, optIn != null))
|
||||
{
|
||||
if (optIn != null)
|
||||
{
|
||||
this.testingWarningModalOnNextFrame = true;
|
||||
configuration.PluginTestingOptIns!.Remove(optIn);
|
||||
|
||||
if (plugin.Manifest.TestingAssemblyVersion > repoManifest?.AssemblyVersion)
|
||||
{
|
||||
this.testingWarningModalOnNextFrame = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
configuration.PluginTestingOptIns!.Add(new PluginTestingOptIn(plugin.Manifest.InternalName));
|
||||
else
|
||||
{
|
||||
configuration.PluginTestingOptIns!.Add(new PluginTestingOptIn(plugin.Manifest.InternalName));
|
||||
}
|
||||
|
||||
configuration.QueueSave();
|
||||
}
|
||||
|
||||
configuration.QueueSave();
|
||||
if (repoManifest?.IsTestingExclusive == true)
|
||||
ImGui.EndDisabled();
|
||||
}
|
||||
|
||||
if (repoManifest?.IsTestingExclusive == true)
|
||||
ImGui.EndDisabled();
|
||||
|
||||
if (ImGui.MenuItem(Locs.PluginContext_DeletePluginConfigReload))
|
||||
{
|
||||
Log.Debug($"Deleting config for {plugin.Manifest.InternalName}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue