removes a bit of jank from bwoinkwindow
sorta fixes sorting
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Shared.Administration;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
@@ -14,6 +16,7 @@ namespace Content.Client.Administration.UI.CustomControls
|
||||
public readonly NetUserId ChannelId;
|
||||
|
||||
public int Unread { get; private set; } = 0;
|
||||
public DateTime LastMessage { get; private set; }
|
||||
|
||||
public BwoinkPanel(BwoinkSystem bwoinkSys, NetUserId userId)
|
||||
{
|
||||
@@ -37,13 +40,15 @@ namespace Content.Client.Administration.UI.CustomControls
|
||||
SenderLineEdit.Clear();
|
||||
}
|
||||
|
||||
public void ReceiveLine(string text)
|
||||
public void ReceiveLine(SharedBwoinkSystem.BwoinkTextMessage message)
|
||||
{
|
||||
if (!Visible)
|
||||
Unread++;
|
||||
|
||||
var formatted = new FormattedMessage(1);
|
||||
formatted.AddMarkup(text);
|
||||
formatted.AddMarkup($"[color=gray]{message.SentAt.ToShortTimeString()}[/color] {message.Text}");
|
||||
TextOutput.AddMessage(formatted);
|
||||
LastMessage = message.SentAt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user