mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 11:12:54 +08:00
Fix progress notifications being able to be flung
This commit is contained in:
parent
82d4689716
commit
b6dd8168d2
@ -68,6 +68,8 @@ namespace osu.Game.Overlays.Notifications
|
||||
|
||||
public virtual bool Read { get; set; }
|
||||
|
||||
protected virtual bool AllowFlingDismiss => true;
|
||||
|
||||
public new bool IsDragged => dragContainer.IsDragged;
|
||||
|
||||
protected virtual IconUsage CloseButtonIcon => FontAwesome.Solid.Check;
|
||||
@ -315,7 +317,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
|
||||
protected override void OnDragEnd(DragEndEvent e)
|
||||
{
|
||||
if (Rotation < -10 || velocity.X < -0.3f)
|
||||
if (notification.AllowFlingDismiss && (Rotation < -10 || velocity.X < -0.3f))
|
||||
notification.Close(true);
|
||||
else if (X > 30 || velocity.X > 0.3f)
|
||||
notification.ForwardToOverlay?.Invoke();
|
||||
|
@ -25,6 +25,8 @@ namespace osu.Game.Overlays.Notifications
|
||||
|
||||
public Func<bool>? CancelRequested { get; set; }
|
||||
|
||||
protected override bool AllowFlingDismiss => false;
|
||||
|
||||
/// <summary>
|
||||
/// The function to post completion notifications back to.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user