Remove useless local actions on click

This commit is contained in:
ansel
2022-11-29 14:25:51 +03:00
parent cfffe5f002
commit 6c126f5223
2 changed files with 1 additions and 17 deletions

View File

@ -116,6 +116,7 @@ namespace osu.Game.Tests.Visual.UserInterface
private void onCommit(string value) private void onCommit(string value)
{ {
IsLoading = true;
CommittedText = value; CommittedText = value;
Scheduler.AddDelayed(() => IsLoading = false, 1000); Scheduler.AddDelayed(() => IsLoading = false, 1000);
} }

View File

@ -14,7 +14,6 @@ using osu.Game.Graphics.UserInterface;
using System; using System;
using osuTK; using osuTK;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Input.Events;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Game.Graphics.UserInterfaceV2; using osu.Game.Graphics.UserInterfaceV2;
@ -221,22 +220,6 @@ namespace osu.Game.Overlays.Comments
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold), Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold),
Margin = new MarginPadding { Horizontal = 20 }, Margin = new MarginPadding { Horizontal = 20 },
}; };
protected override bool OnClick(ClickEvent e)
{
if (!Enabled.Value)
return false;
try
{
return base.OnClick(e);
}
finally
{
// run afterwards as this will disable this button.
IsLoading = true;
}
}
} }
} }
} }