1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 19:22:54 +08:00

MonthDropdown -> MonthSection

This commit is contained in:
Dean Herbert 2021-05-17 16:02:21 +09:00
parent 50e2b5a327
commit 22561cda19
3 changed files with 6 additions and 6 deletions

View File

@ -35,7 +35,7 @@ namespace osu.Game.Tests.Visual.Online
public void TestMetadataWithNoPosts()
{
AddStep("Add data with no posts", () => sidebar.Metadata.Value = metadata_with_no_posts);
AddUntilStep("No dropdowns were created", () => !sidebar.ChildrenOfType<MonthDropdown>().Any());
AddUntilStep("No dropdowns were created", () => !sidebar.ChildrenOfType<MonthSection>().Any());
}
private YearsPanel yearsPanel => sidebar.ChildrenOfType<YearsPanel>().FirstOrDefault();

View File

@ -18,13 +18,13 @@ using System.Diagnostics;
namespace osu.Game.Overlays.News.Sidebar
{
public class MonthDropdown : CompositeDrawable
public class MonthSection : CompositeDrawable
{
private const int animation_duration = 250;
public readonly BindableBool IsOpen = new BindableBool();
public MonthDropdown(int month, int year, IEnumerable<APINewsPost> posts)
public MonthSection(int month, int year, IEnumerable<APINewsPost> posts)
{
Debug.Assert(posts.All(p => p.PublishedAt.Month == month && p.PublishedAt.Year == year));

View File

@ -17,7 +17,7 @@ namespace osu.Game.Overlays.News.Sidebar
[Cached]
public readonly Bindable<APINewsSidebar> Metadata = new Bindable<APINewsSidebar>();
private FillFlowContainer<MonthDropdown> monthsFlow;
private FillFlowContainer<MonthSection> monthsFlow;
[BackgroundDependencyLoader]
private void load(OverlayColourProvider colourProvider)
@ -49,7 +49,7 @@ namespace osu.Game.Overlays.News.Sidebar
Children = new Drawable[]
{
new YearsPanel(),
monthsFlow = new FillFlowContainer<MonthDropdown>
monthsFlow = new FillFlowContainer<MonthSection>
{
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
@ -93,7 +93,7 @@ namespace osu.Game.Overlays.News.Sidebar
var month = sortedKeys[i];
var posts = lookup[month];
monthsFlow.Add(new MonthDropdown(month, year, posts)
monthsFlow.Add(new MonthSection(month, year, posts)
{
IsOpen = { Value = i == 0 }
});