Reset top score avatar before updating it

This commit is contained in:
HoLLy
2019-06-21 16:47:19 +02:00
parent 1204c56d2d
commit fafec00667
2 changed files with 15 additions and 0 deletions

View File

@ -52,6 +52,20 @@ namespace osu.Game.Users.Drawables
User = user;
}
/// <summary>
/// Fades and expires the <see cref="ModelBackedDrawable{T}.DisplayedDrawable"/>, and sets the
/// <see cref="ModelBackedDrawable{T}.Model"/> to null.
/// </summary>
/// <remarks>
/// Can be used when the <see cref="ModelBackedDrawable{T}.DisplayedDrawable"/> needs to be removed instantly.
/// </remarks>
public void Reset()
{
DisplayedDrawable?.FadeOut().Expire();
User = null;
}
protected override Drawable CreateDrawable(User user)
{
if (user == null && !ShowGuestOnNull)