Fix AHelp progressively showing more AHelp panels (#20591)

This commit is contained in:
DrSmugleaf
2023-09-28 18:46:16 -07:00
committed by GitHub
parent 072db2d817
commit 445e6aabed
2 changed files with 9 additions and 0 deletions

View File

@@ -235,6 +235,7 @@ namespace Content.Client.Administration.UI.Bwoink
if (ch != null) if (ch != null)
{ {
AHelpHelper.HideAllPanels();
var panel = AHelpHelper.EnsurePanel(ch.Value); var panel = AHelpHelper.EnsurePanel(ch.Value);
panel.Visible = true; panel.Visible = true;
} }

View File

@@ -437,6 +437,14 @@ public sealed class AdminAHelpUIHandler : IAHelpUIHandler
} }
} }
public void HideAllPanels()
{
foreach (var panel in _activePanelMap.Values)
{
panel.Visible = false;
}
}
public BwoinkPanel EnsurePanel(NetUserId channelId) public BwoinkPanel EnsurePanel(NetUserId channelId)
{ {
EnsureControl(); EnsureControl();