mirror of
https://github.com/ppy/osu
synced 2025-02-07 13:51:59 +00:00
Use pattern matching instead of .(Has)?Value
This commit is contained in:
parent
63006e8672
commit
71c34a36ed
@ -163,14 +163,14 @@ namespace osu.Game.Overlays
|
||||
|
||||
BeatmapSet.BindValueChanged(beatmapSet =>
|
||||
{
|
||||
if (beatmapSet.NewValue?.OnlineBeatmapSetID.HasValue != true)
|
||||
if (beatmapSet.NewValue?.OnlineBeatmapSetID is int onlineBeatmapSetID)
|
||||
{
|
||||
Hide();
|
||||
Show();
|
||||
comments.ShowComments(CommentableType.Beatmapset, onlineBeatmapSetID);
|
||||
}
|
||||
else
|
||||
{
|
||||
Show();
|
||||
comments.ShowComments(CommentableType.Beatmapset, beatmapSet.NewValue.OnlineBeatmapSetID.Value);
|
||||
Hide();
|
||||
}
|
||||
}, true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user