Fix AHelp window being recentered when opened through the verb (#14219)
This commit is contained in:
@@ -253,6 +253,17 @@ public sealed class AdminAHelpUIHandler : IAHelpUIHandler
|
|||||||
Control?.OnBwoink(message.UserId);
|
Control?.OnBwoink(message.UserId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OpenWindow()
|
||||||
|
{
|
||||||
|
if (Window == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (EverOpened)
|
||||||
|
Window.Open();
|
||||||
|
else
|
||||||
|
Window.OpenCentered();
|
||||||
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
Window?.Close();
|
Window?.Close();
|
||||||
@@ -282,18 +293,9 @@ public sealed class AdminAHelpUIHandler : IAHelpUIHandler
|
|||||||
EnsurePanel(_ownerId);
|
EnsurePanel(_ownerId);
|
||||||
|
|
||||||
if (IsOpen)
|
if (IsOpen)
|
||||||
{
|
|
||||||
Close();
|
Close();
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
OpenWindow();
|
||||||
if (EverOpened)
|
|
||||||
Window!.Open();
|
|
||||||
else
|
|
||||||
Window!.OpenCentered();
|
|
||||||
|
|
||||||
EverOpened = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public event Action? OnClose;
|
public event Action? OnClose;
|
||||||
@@ -303,7 +305,7 @@ public sealed class AdminAHelpUIHandler : IAHelpUIHandler
|
|||||||
public void Open(NetUserId channelId)
|
public void Open(NetUserId channelId)
|
||||||
{
|
{
|
||||||
SelectChannel(channelId);
|
SelectChannel(channelId);
|
||||||
Window?.OpenCentered();
|
OpenWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnRequestClosed(WindowRequestClosedEventArgs args)
|
public void OnRequestClosed(WindowRequestClosedEventArgs args)
|
||||||
|
|||||||
Reference in New Issue
Block a user