Remove FlashTaskbar and use IsImportant directly instead

This commit is contained in:
Bartłomiej Dach 2023-08-22 08:58:10 +02:00
parent be1a712f33
commit aa29e00578
No known key found for this signature in database
3 changed files with 2 additions and 9 deletions

View File

@ -179,9 +179,9 @@ namespace osu.Game.Overlays
playDebouncedSample(notification.PopInSampleName);
if (notification.FlashTaskbar)
if (notification.IsImportant)
{
game?.Window?.Flash(notification.IsImportant);
game?.Window?.Flash();
notification.Closed += () => game?.Window?.CancelFlash();
}

View File

@ -38,11 +38,6 @@ namespace osu.Game.Overlays.Notifications
/// </summary>
public virtual bool IsImportant => true;
/// <summary>
/// Whether this notification should trigger a taskbar flash if the window is un-focused when posted.
/// </summary>
public bool FlashTaskbar { get; init; } = true;
/// <summary>
/// Run on user activating the notification. Return true to close.
/// </summary>

View File

@ -568,7 +568,6 @@ namespace osu.Game.Screens.Play
public MutedNotification()
{
Text = NotificationsStrings.GameVolumeTooLow;
FlashTaskbar = false;
}
[BackgroundDependencyLoader]
@ -624,7 +623,6 @@ namespace osu.Game.Screens.Play
public BatteryWarningNotification()
{
Text = NotificationsStrings.BatteryLow;
FlashTaskbar = false;
}
[BackgroundDependencyLoader]