1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 15:52:54 +08:00

Ensure empty pieces do not result in whitespace between elements

This commit is contained in:
Dean Herbert 2022-11-30 14:43:21 +09:00
parent 2df6ccf33e
commit b453eecebe

View File

@ -68,7 +68,15 @@ namespace osu.Game.Online.Chat
break;
}
channelManager.PostMessage($"is {verb} {getBeatmapPart()} {getModPart()}", true, target);
string[] pieces =
{
"is",
verb,
getBeatmapPart(),
getModPart(),
};
channelManager.PostMessage(string.Join(' ', pieces.Where(p => !string.IsNullOrEmpty(p))), true, target);
Expire();
string getBeatmapPart()