From a55e5c5c437da004583e22e4297632f5e29d376e Mon Sep 17 00:00:00 2001 From: Willy Tu Date: Fri, 20 Dec 2019 11:16:54 -0800 Subject: [PATCH] Removed unnecessary code --- .../TestSceneDeleteLocalScore.cs | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneDeleteLocalScore.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneDeleteLocalScore.cs index 0441d8659e..6ca75ea9cb 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneDeleteLocalScore.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneDeleteLocalScore.cs @@ -66,12 +66,12 @@ namespace osu.Game.Tests.Visual.UserInterface }, }; - AddStep("Insert Local Scores", () => reset()); + AddStep("Insert Local Scores", reset); } private void reset() { - leaderboard.initialLoad = true; + leaderboard.InitialLoad = true; leaderboard.RefreshScores(); } @@ -88,7 +88,7 @@ namespace osu.Game.Tests.Visual.UserInterface private Random rnd; - public bool initialLoad; + public bool InitialLoad; public void DeleteScore(ScoreInfo score) { @@ -98,7 +98,7 @@ namespace osu.Game.Tests.Visual.UserInterface public FailableLeaderboard() { - initialLoad = true; + InitialLoad = true; } public void SetRetrievalState(PlaceholderState state) @@ -108,14 +108,14 @@ namespace osu.Game.Tests.Visual.UserInterface protected override APIRequest FetchScores(Action> scoresCallback) { - if (initialLoad) + if (InitialLoad) { rnd = new Random(); scoreList = Enumerable.Range(1, 50).Select(createScore).ToList(); Scores = scoreList.OrderByDescending(s => s.TotalScore).ToArray(); - initialLoad = false; + InitialLoad = false; } else { @@ -169,10 +169,6 @@ namespace osu.Game.Tests.Visual.UserInterface private class TestLocalScoreDeleteDialog : PopupDialog { - public readonly PopupDialogOkButton ConfirmButton; - - public readonly PopupDialogCancelButton CancelButton; - public TestLocalScoreDeleteDialog(ScoreInfo score, FailableLeaderboard leaderboard) { Debug.Assert(score != null); @@ -184,12 +180,12 @@ namespace osu.Game.Tests.Visual.UserInterface HeaderText = @"Deleting this local score. Are you sure?"; Buttons = new PopupDialogButton[] { - ConfirmButton = new PopupDialogOkButton + new PopupDialogOkButton { Text = @"Yes. Please.", Action = () => leaderboard.DeleteScore(score) }, - CancelButton = new PopupDialogCancelButton + new PopupDialogCancelButton { Text = @"No, I'm still attached.", },