From aa4afa87769208cf8536b167df29d4e279bf0c66 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 29 Jul 2025 15:02:18 +0900 Subject: [PATCH] Make `UserAvatarNotification` abstract since it has no actual usage --- .../UserInterface/TestSceneNotificationOverlay.cs | 12 ------------ .../Overlays/Notifications/UserAvatarNotification.cs | 4 ++-- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneNotificationOverlay.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneNotificationOverlay.cs index 3648291816..9d23b2130a 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneNotificationOverlay.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneNotificationOverlay.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Linq; using System.Threading; using NUnit.Framework; -using osu.Framework.Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; @@ -65,7 +64,6 @@ namespace osu.Game.Tests.Visual.UserInterface AddStep(@"simple #2", sendAmazingNotification); AddStep(@"progress #1", sendUploadProgress); AddStep(@"progress #2", sendDownloadProgress); - AddStep(@"User notification", sendUserNotification); checkProgressingCount(2); @@ -577,16 +575,6 @@ namespace osu.Game.Tests.Visual.UserInterface progressingNotifications.Add(n); } - private void sendUserNotification() - { - var user = userLookupCache.GetUserAsync(0).GetResultSafely(); - if (user == null) return; - - var n = new UserAvatarNotification(user, $"{user.Username} invited you to a multiplayer match!"); - - notificationOverlay.Post(n); - } - private void sendUploadProgress() { var n = new ProgressNotification diff --git a/osu.Game/Overlays/Notifications/UserAvatarNotification.cs b/osu.Game/Overlays/Notifications/UserAvatarNotification.cs index fe69c47173..621052bf97 100644 --- a/osu.Game/Overlays/Notifications/UserAvatarNotification.cs +++ b/osu.Game/Overlays/Notifications/UserAvatarNotification.cs @@ -9,13 +9,13 @@ using osu.Game.Users.Drawables; namespace osu.Game.Overlays.Notifications { - public partial class UserAvatarNotification : SimpleNotification + public abstract partial class UserAvatarNotification : SimpleNotification { private readonly APIUser? user; protected DrawableAvatar Avatar { get; private set; } = null!; - public UserAvatarNotification(APIUser? user, LocalisableString text = default) + protected UserAvatarNotification(APIUser? user, LocalisableString text = default) { this.user = user;