From 01de2dc55b40c518c97c18dc331fd6f2f1bc4a8d Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Sat, 16 Aug 2025 16:03:47 +0900 Subject: [PATCH] Always add an icon --- .../Notifications/UserAvatarNotification.cs | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/osu.Game/Overlays/Notifications/UserAvatarNotification.cs b/osu.Game/Overlays/Notifications/UserAvatarNotification.cs index c283d36468..7dbecbf11e 100644 --- a/osu.Game/Overlays/Notifications/UserAvatarNotification.cs +++ b/osu.Game/Overlays/Notifications/UserAvatarNotification.cs @@ -26,26 +26,20 @@ namespace osu.Game.Overlays.Notifications [BackgroundDependencyLoader] private void load() { - Avatar = new DrawableAvatar(user) + IconContent.Masking = true; + IconContent.CornerRadius = CORNER_RADIUS; + IconContent.ChangeChildDepth(IconDrawable, float.MinValue); + + LoadComponentAsync(Avatar = new DrawableAvatar(user) { FillMode = FillMode.Fill, - }; - - if (user != null) - { - IconContent.Masking = true; - IconContent.CornerRadius = CORNER_RADIUS; - IconContent.ChangeChildDepth(IconDrawable, float.MinValue); - LoadComponentAsync(Avatar, IconContent.Add); - } + }, IconContent.Add); } protected override void Update() { base.Update(); - - if (user != null) - IconContent.Width = IconContent.DrawHeight; + IconContent.Width = IconContent.DrawHeight; } } }