From b45e7246b85a859fb2a6a2306914b37999d76ff8 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Thu, 10 Oct 2019 15:56:08 +0300 Subject: [PATCH] Rename SortCommentsBy to CommentsSortCriteria --- .../Visual/Online/TestSceneCommentsHeader.cs | 8 ++++---- osu.Game/Overlays/Comments/CommentsHeader.cs | 2 +- osu.Game/Overlays/Comments/SortSelector.cs | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneCommentsHeader.cs b/osu.Game.Tests/Visual/Online/TestSceneCommentsHeader.cs index 52318605d9..949dbbe5c4 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneCommentsHeader.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneCommentsHeader.cs @@ -19,7 +19,7 @@ public class TestSceneCommentsHeader : OsuTestScene typeof(SortSelector), }; - private readonly Bindable sort = new Bindable(); + private readonly Bindable sort = new Bindable(); private readonly BindableBool showDeleted = new BindableBool(); public TestSceneCommentsHeader() @@ -31,9 +31,9 @@ public TestSceneCommentsHeader() }); AddStep("Trigger ShowDeleted", () => showDeleted.Value = !showDeleted.Value); - AddStep("Select old", () => sort.Value = SortCommentsBy.Old); - AddStep("Select new", () => sort.Value = SortCommentsBy.New); - AddStep("Select top", () => sort.Value = SortCommentsBy.Top); + AddStep("Select old", () => sort.Value = CommentsSortCriteria.Old); + AddStep("Select new", () => sort.Value = CommentsSortCriteria.New); + AddStep("Select top", () => sort.Value = CommentsSortCriteria.Top); } } } diff --git a/osu.Game/Overlays/Comments/CommentsHeader.cs b/osu.Game/Overlays/Comments/CommentsHeader.cs index fb507e6cb2..2bd2bf21a6 100644 --- a/osu.Game/Overlays/Comments/CommentsHeader.cs +++ b/osu.Game/Overlays/Comments/CommentsHeader.cs @@ -20,7 +20,7 @@ public class CommentsHeader : CompositeDrawable private const int padding = 50; private const int text_size = 14; - public readonly Bindable Sort = new Bindable(); + public readonly Bindable Sort = new Bindable(); public readonly BindableBool ShowDeleted = new BindableBool(); private readonly Box background; diff --git a/osu.Game/Overlays/Comments/SortSelector.cs b/osu.Game/Overlays/Comments/SortSelector.cs index b4e29477d7..100ae83291 100644 --- a/osu.Game/Overlays/Comments/SortSelector.cs +++ b/osu.Game/Overlays/Comments/SortSelector.cs @@ -15,13 +15,13 @@ namespace osu.Game.Overlays.Comments { - public class SortSelector : OsuTabControl + public class SortSelector : OsuTabControl { private const int spacing = 5; - protected override Dropdown CreateDropdown() => null; + protected override Dropdown CreateDropdown() => null; - protected override TabItem CreateTabItem(SortCommentsBy value) => new SortTabItem(value); + protected override TabItem CreateTabItem(CommentsSortCriteria value) => new SortTabItem(value); protected override TabFillFlowContainer CreateTabFlow() => new TabFillFlowContainer { @@ -35,11 +35,11 @@ public SortSelector() AutoSizeAxes = Axes.Both; } - private class SortTabItem : TabItem + private class SortTabItem : TabItem { private readonly TabContent content; - public SortTabItem(SortCommentsBy value) + public SortTabItem(CommentsSortCriteria value) : base(value) { AutoSizeAxes = Axes.Both; @@ -64,7 +64,7 @@ private class TabContent : HeaderButton private readonly SpriteText text; - public TabContent(SortCommentsBy value) + public TabContent(CommentsSortCriteria value) { Add(text = new SpriteText { @@ -97,7 +97,7 @@ protected override void OnHoverLost(HoverLostEvent e) } } - public enum SortCommentsBy + public enum CommentsSortCriteria { New, Old,