1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 23:23:52 +08:00

Fix user profile overlay colour resetting when changing rulesets

This commit is contained in:
Salman Ahmed 2024-08-13 13:01:50 +03:00
parent 50601544b3
commit c9b2a5bb9c

View File

@ -96,7 +96,8 @@ namespace osu.Game.Overlays
{ {
Debug.Assert(user != null); Debug.Assert(user != null);
if (user.OnlineID == Header.User.Value?.User.Id && ruleset?.MatchesOnlineID(Header.User.Value?.Ruleset) == true) bool sameUser = user.OnlineID == Header.User.Value?.User.Id;
if (sameUser && ruleset?.MatchesOnlineID(Header.User.Value?.Ruleset) == true)
return; return;
if (sectionsContainer != null) if (sectionsContainer != null)
@ -118,7 +119,9 @@ namespace osu.Game.Overlays
} }
: Array.Empty<ProfileSection>(); : Array.Empty<ProfileSection>();
changeOverlayColours(OverlayColourScheme.Pink.GetHue()); if (!sameUser)
changeOverlayColours(OverlayColourScheme.Pink.GetHue());
recreateBaseContent(); recreateBaseContent();
if (API.State.Value != APIState.Offline) if (API.State.Value != APIState.Offline)