Fix not being able to message players that weren't filtered by the ahelp menu (#13553)
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Content.Client.Administration.Managers;
|
||||
using Content.Client.Administration.UI.CustomControls;
|
||||
using Content.Client.Administration.UI.Tabs.AdminTab;
|
||||
using Content.Client.Stylesheets;
|
||||
using Content.Client.UserInterface.Systems.Bwoink;
|
||||
using Content.Client.UserInterface.Systems.Chat.Controls;
|
||||
using Content.Shared.Administration;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.Console;
|
||||
@@ -171,13 +173,23 @@ namespace Content.Client.Administration.UI.Bwoink
|
||||
ChannelSelector.PopulateList();
|
||||
}
|
||||
|
||||
|
||||
public void SelectChannel(NetUserId channel)
|
||||
{
|
||||
if (!ChannelSelector.PlayerInfo.TryFirstOrDefault(
|
||||
i => i.SessionId == channel, out var info))
|
||||
return;
|
||||
|
||||
// clear filter if we're trying to select a channel for a player that isn't currently filtered
|
||||
// i.e. through the message verb.
|
||||
var data = new PlayerListData(info);
|
||||
if (!ChannelSelector.PlayerListContainer.Data.Contains(data))
|
||||
{
|
||||
ChannelSelector.StopFiltering();
|
||||
}
|
||||
|
||||
ChannelSelector.PopulateList();
|
||||
ChannelSelector.PlayerListContainer.Select(new PlayerListData(info));
|
||||
ChannelSelector.PlayerListContainer.Select(data);
|
||||
}
|
||||
|
||||
private void FixButtons()
|
||||
|
||||
@@ -62,6 +62,11 @@ namespace Content.Client.Administration.UI.CustomControls
|
||||
}
|
||||
}
|
||||
|
||||
public void StopFiltering()
|
||||
{
|
||||
FilterLineEdit.Text = string.Empty;
|
||||
}
|
||||
|
||||
private void FilterList()
|
||||
{
|
||||
_sortedPlayerList.Clear();
|
||||
|
||||
Reference in New Issue
Block a user