1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 20:13:21 +08:00

Flip and rename CompletedOrCancelled to Ongoing

This commit is contained in:
Bartłomiej Dach 2023-07-08 14:11:58 +02:00
parent 3a9b259f8a
commit cdaf8e4b0f
No known key found for this signature in database
3 changed files with 7 additions and 4 deletions

View File

@ -42,8 +42,8 @@ namespace osu.Game.Overlays
IEnumerable<Notification> AllNotifications { get; }
/// <summary>
/// All ongoing operations (ie. any <see cref="ProgressNotification"/> not in a completed state).
/// All ongoing operations (ie. any <see cref="ProgressNotification"/> not in a completed or cancelled state).
/// </summary>
public IEnumerable<ProgressNotification> OngoingOperations => AllNotifications.OfType<ProgressNotification>().Where(p => !p.CompletedOrCancelled);
public IEnumerable<ProgressNotification> OngoingOperations => AllNotifications.OfType<ProgressNotification>().Where(p => p.Ongoing);
}
}

View File

@ -115,7 +115,7 @@ namespace osu.Game.Overlays.Notifications
private void clearAll() => notifications.Children.ForEach(c =>
{
if (c is not ProgressNotification p || p.CompletedOrCancelled)
if (c is not ProgressNotification p || !p.Ongoing)
c.Close(true);
});

View File

@ -25,7 +25,10 @@ namespace osu.Game.Overlays.Notifications
public Func<bool>? CancelRequested { get; set; }
public bool CompletedOrCancelled => State == ProgressNotificationState.Completed || State == ProgressNotificationState.Cancelled;
/// <summary>
/// Whether the operation represented by the <see cref="ProgressNotification"/> is still ongoing.
/// </summary>
public bool Ongoing => State != ProgressNotificationState.Completed && State != ProgressNotificationState.Cancelled;
protected override bool AllowFlingDismiss => false;