Skip to content

Commit

Permalink
Revert "Chat Stack (#935)"
Browse files Browse the repository at this point in the history
This reverts commit 79fd150.
  • Loading branch information
rhailrake committed Dec 27, 2024
1 parent 6bc4fbd commit 502a7c3
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 1,057 deletions.
17 changes: 0 additions & 17 deletions Content.Client/UserInterface/Systems/Chat/ChatUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ private readonly Dictionary<EntityUid, SpeechBubbleQueueData> _queuedSpeechBubbl
public ChatSelectChannel SelectableChannels { get; private set; }
private ChatSelectChannel PreferredChannel { get; set; } = ChatSelectChannel.OOC;

public ChatMessage? LastMessage = null;

public event Action<ChatSelectChannel>? CanSendChannelsChanged;
public event Action<ChatChannel>? FilterableChannelsChanged;
public event Action<ChatSelectChannel>? SelectableChannelsChanged;
Expand Down Expand Up @@ -882,21 +880,6 @@ public void ProcessChatMessage(ChatMessage msg, bool speechBubble = true)
}
}

if (LastMessage != null && msg.Message == LastMessage.Message)
{
LastMessage.repeat++;
LastMessage.WrappedMessage = msg.WrappedMessage + $" x{LastMessage.repeat}";

foreach (var chat in _chats)
{
// chat._controller.History[index].Item2
chat.UpdateMessage(chat.GetHistoryLength() - 1, LastMessage);
}
return;
}

LastMessage = msg;

// Log all incoming chat to repopulate when filter is un-toggled
if (!msg.HideChat)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
xmlns="https://spacestation14.io"
xmlns:widgets="clr-namespace:Content.Client.UserInterface.Systems.Chat.Widgets"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Systems.Chat.Controls"
xmlns:controls1="clr-namespace:Content.Client._Sunrise.UI.Controls"
MouseFilter="Stop"
HorizontalExpand="True"
VerticalExpand="True"
MinSize="465 225">
<PanelContainer Name="ChatWindowPanel" Access="Public" HorizontalExpand="True" VerticalExpand="True"
StyleClasses="StyleNano.StyleClassChatPanel">
<BoxContainer Orientation="Vertical" SeparationOverride="4" HorizontalExpand="True" VerticalExpand="True">
<controls1:SunriseOutputPanel Name="Contents" HorizontalExpand="True" VerticalExpand="True" Margin="8 8 8 4" />
<OutputPanel Name="Contents" HorizontalExpand="True" VerticalExpand="True" Margin="8 8 8 4" />
<controls:ChatInputBox HorizontalExpand="True" Name="ChatInput" Access="Public" Margin="2"/>
</BoxContainer>
</PanelContainer>
Expand Down
23 changes: 0 additions & 23 deletions Content.Client/UserInterface/Systems/Chat/Widgets/ChatBox.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,29 +104,6 @@ private void OnChannelFilter(ChatChannel channel, bool active)
}
}

public int GetHistoryLength()
{
return _controller.History.Count;
}

public void UpdateMessage(int index, ChatMessage message)
{
var updatedTuple = (_controller.History[index].Item1, message);
_controller.History.Pop();
_controller.History.Add(updatedTuple);

var color = message.MessageColorOverride != null
? message.MessageColorOverride.Value
: message.Channel.TextColor();

var formatted = new FormattedMessage(3);

formatted.AddMarkup(message.WrappedMessage);
formatted.PushColor(color);

Contents.UpdateLastMessage(formatted);
}

public void AddLine(string message, Color color)
{
var formatted = new FormattedMessage(3);
Expand Down
289 changes: 0 additions & 289 deletions Content.Client/_Sunrise/UI/Controls/SunriseOutputPanel.cs

This file was deleted.

Loading

0 comments on commit 502a7c3

Please sign in to comment.