diff --git a/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml.cs b/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml.cs index 665b8eced0..7f779dd2f8 100644 --- a/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml.cs +++ b/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml.cs @@ -420,14 +420,18 @@ public sealed partial class AdminLogsControl : Control public void SetPlayers(Dictionary players) { var buttons = new SortedSet(_adminLogPlayerButtonComparer); + var allSelected = true; foreach (var control in PlayersContainer.Children.ToArray()) { - if (control is not AdminLogPlayerButton player || - !players.Remove(player.Id)) - { + if (control is not AdminLogPlayerButton player) + continue; + + if (!SelectedPlayers.Contains(player.Id)) + allSelected = false; + + if (!players.Remove(player.Id)) continue; - } buttons.Add(player); } @@ -437,10 +441,12 @@ public sealed partial class AdminLogsControl : Control var button = new AdminLogPlayerButton(id) { Text = name, - Pressed = true + Pressed = allSelected }; - SelectedPlayers.Add(id); + if (allSelected) + SelectedPlayers.Add(id); + button.OnPressed += PlayerButtonPressed; buttons.Add(button);