From 4ee3e8f087e14631622ffca7f446485f50d4982c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 12 Sep 2022 18:57:18 +0900 Subject: [PATCH] Don't play fling animation when activating a notification --- osu.Game/Overlays/Notifications/Notification.cs | 6 +++--- osu.Game/Overlays/Notifications/ProgressNotification.cs | 4 ++-- osu.Game/Updater/UpdateManager.cs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/osu.Game/Overlays/Notifications/Notification.cs b/osu.Game/Overlays/Notifications/Notification.cs index acb277d4b4..887d729de7 100644 --- a/osu.Game/Overlays/Notifications/Notification.cs +++ b/osu.Game/Overlays/Notifications/Notification.cs @@ -227,7 +227,7 @@ namespace osu.Game.Overlays.Notifications if (e.Button == MouseButton.Left) Activated?.Invoke(); - Close(true); + Close(false); return true; } @@ -245,13 +245,13 @@ namespace osu.Game.Overlays.Notifications public bool WasClosed; - public virtual void Close(bool userTriggered) + public virtual void Close(bool runFlingAnimation) { if (WasClosed) return; WasClosed = true; - if (userTriggered && dragContainer.FlingLeft()) + if (runFlingAnimation && dragContainer.FlingLeft()) this.FadeOut(600, Easing.In); else { diff --git a/osu.Game/Overlays/Notifications/ProgressNotification.cs b/osu.Game/Overlays/Notifications/ProgressNotification.cs index 55d6d5057a..c4d402e5b9 100644 --- a/osu.Game/Overlays/Notifications/ProgressNotification.cs +++ b/osu.Game/Overlays/Notifications/ProgressNotification.cs @@ -235,12 +235,12 @@ namespace osu.Game.Overlays.Notifications }); } - public override void Close(bool userTriggered) + public override void Close(bool runFlingAnimation) { switch (State) { case ProgressNotificationState.Cancelled: - base.Close(userTriggered); + base.Close(runFlingAnimation); break; case ProgressNotificationState.Active: diff --git a/osu.Game/Updater/UpdateManager.cs b/osu.Game/Updater/UpdateManager.cs index 2ef6741ffd..100464029b 100644 --- a/osu.Game/Updater/UpdateManager.cs +++ b/osu.Game/Updater/UpdateManager.cs @@ -148,7 +148,7 @@ namespace osu.Game.Updater StartDownload(); } - public override void Close(bool userTriggered) + public override void Close(bool runFlingAnimation) { // cancelling updates is not currently supported by the underlying updater. // only allow dismissing for now. @@ -156,7 +156,7 @@ namespace osu.Game.Updater switch (State) { case ProgressNotificationState.Cancelled: - base.Close(userTriggered); + base.Close(runFlingAnimation); break; } }