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; 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(); Expire();
string getBeatmapPart() string getBeatmapPart()