1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:02:53 +08:00

Remove second overload of Close (makes the call structure hard to follow / invoke correctly)

This commit is contained in:
Dean Herbert 2021-02-11 14:18:00 +09:00
parent 2ee634d173
commit 72562070bc
2 changed files with 4 additions and 6 deletions

View File

@ -114,7 +114,7 @@ namespace osu.Game.Overlays.Notifications
closeButton = new CloseButton
{
Alpha = 0,
Action = Close,
Action = () => Close(),
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Margin = new MarginPadding
@ -167,9 +167,7 @@ namespace osu.Game.Overlays.Notifications
public bool WasClosed;
public virtual void Close() => Close(true);
public virtual void Close(bool playSound)
public virtual void Close(bool playSound = true)
{
if (WasClosed) return;

View File

@ -150,12 +150,12 @@ namespace osu.Game.Overlays.Notifications
colourCancelled = colours.Red;
}
public override void Close()
public override void Close(bool playSound = true)
{
switch (State)
{
case ProgressNotificationState.Cancelled:
base.Close();
base.Close(playSound);
break;
case ProgressNotificationState.Active: