mirror of
https://github.com/ppy/osu
synced 2024-12-28 09:52:56 +00:00
Inline disturbing getGuestMapper()
method
Disturbing because name suggests pure method, but it is in fact `void` and also performs side effects by about the most confusing means possible.
This commit is contained in:
parent
a86a968fac
commit
11fd93a2ba
@ -214,22 +214,17 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
if (beatmapInfo?.AuthorID != BeatmapSet?.AuthorID)
|
||||
{
|
||||
APIUser? user = BeatmapSet?.RelatedUsers?.SingleOrDefault(u => u.OnlineID == beatmapInfo?.AuthorID);
|
||||
|
||||
if (user != null)
|
||||
getGuestMapper(user);
|
||||
{
|
||||
guestMapperContainer.AddText("mapped by ");
|
||||
guestMapperContainer.AddUserLink(user);
|
||||
}
|
||||
}
|
||||
|
||||
version.Text = beatmapInfo?.DifficultyName ?? string.Empty;
|
||||
}
|
||||
|
||||
private void getGuestMapper(APIUser user)
|
||||
{
|
||||
guestMapperContainer.With(d =>
|
||||
{
|
||||
d.AddText("mapped by ");
|
||||
d.AddUserLink(user);
|
||||
});
|
||||
}
|
||||
|
||||
private void updateDifficultyButtons()
|
||||
{
|
||||
Difficulties.Children.ToList().ForEach(diff => diff.State = diff.Beatmap == Beatmap.Value ? DifficultySelectorState.Selected : DifficultySelectorState.NotSelected);
|
||||
|
Loading…
Reference in New Issue
Block a user