diff --git a/src/EchoHub.Client/UI/Chat/ChatColors.cs b/src/EchoHub.Client/UI/Chat/ChatColors.cs index f6fc1ec..0eee5a6 100644 --- a/src/EchoHub.Client/UI/Chat/ChatColors.cs +++ b/src/EchoHub.Client/UI/Chat/ChatColors.cs @@ -39,6 +39,10 @@ public static partial class ChatColors lastIndex = match.Index + match.Length; } + // Add remaining text after the last mention (or all text if no mentions found) + if (lastIndex < text.Length) + segments.Add(new ChatSegment(text[lastIndex..], defaultColor)); + // Second pass: highlight #channels in non-mention segments var mentionSegments = segments; segments = []; diff --git a/src/EchoHub.Client/UI/MainWindow.cs b/src/EchoHub.Client/UI/MainWindow.cs index 9905312..f46e5cc 100644 --- a/src/EchoHub.Client/UI/MainWindow.cs +++ b/src/EchoHub.Client/UI/MainWindow.cs @@ -923,12 +923,14 @@ public sealed partial class MainWindow : Runnable var name = u.DisplayName ?? u.Username; var roleTag = u.Role switch { - ServerRole.Owner => "\u2605 ", // ★ - ServerRole.Admin => "\u2666 ", // ♦ - ServerRole.Mod => "\u2740 ", // ❀ + ServerRole.Owner => "\u2605", // ★ + ServerRole.Admin => "\u2666", // ♦ + ServerRole.Mod => "\u2740", // ❀ _ => "" }; - var text = $"{statusIcon} {roleTag} {name}"; + var text = roleTag.Length > 0 + ? $"{statusIcon} {roleTag} {name}" + : $"{statusIcon} {name}"; var nameColor = HexColorHelper.ParseHexColor(u.NicknameColor); return (text, nameColor, u.Username); }).ToList();