diff --git a/osu.Game/Overlays/UserProfileOverlay.cs b/osu.Game/Overlays/UserProfileOverlay.cs index a4dd0c9ec3..d8f858b95e 100644 --- a/osu.Game/Overlays/UserProfileOverlay.cs +++ b/osu.Game/Overlays/UserProfileOverlay.cs @@ -71,6 +71,7 @@ namespace osu.Game.Overlays { base.PopOut(); FadeEdgeEffectTo(0, WaveContainer.DISAPPEAR_DURATION, Easing.Out); + cleanup(); } public void ShowUser(long userId) @@ -83,9 +84,7 @@ namespace osu.Game.Overlays public void ShowUser(User user, bool fetchOnline = true) { - userReq?.Cancel(); - Clear(); - lastSection = null; + cleanup(); sections = new ProfileSection[] { @@ -165,6 +164,13 @@ namespace osu.Game.Overlays sectionsContainer.ScrollToTop(); } + private void cleanup() + { + userReq?.Cancel(); + Clear(); + lastSection = null; + } + private void userLoadComplete(User user) { Header.User = user;