1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-18 18:12:55 +08:00

nullable condition

This commit is contained in:
cdwcgt 2023-04-03 20:07:21 +09:00
parent 51240ed46b
commit 41c01d3929
No known key found for this signature in database
GPG Key ID: 144396D01095C3A2

View File

@ -211,21 +211,18 @@ namespace osu.Game.Overlays.BeatmapSet
if (beatmapInfo != null && beatmapSet?.Author.OnlineID != beatmapInfo.AuthorID)
{
if (BeatmapSet?.RelatedUsers?.Single(u => u.OnlineID == beatmapInfo.AuthorID) is APIUser user)
guestMapperContainer.Child = getGuestMapper(user);
APIUser? user = BeatmapSet?.RelatedUsers?.Single(u => u.OnlineID == beatmapInfo?.AuthorID);
if (user != null)
}
version.Text = beatmapInfo?.DifficultyName ?? string.Empty;
}
private Drawable getGuestMapper(APIUser user)
private void getGuestMapper(APIUser user)
{
return new LinkFlowContainer(s =>
guestMapperContainer.With(d =>
{
s.Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 15);
}).With(d =>
{
d.AutoSizeAxes = Axes.Both;
d.AddText("mapped by ");
d.AddUserLink(user);
});