1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 18:42:56 +08:00

Move Rankings property below ctor

This commit is contained in:
Andrei Zavatski 2019-11-27 21:37:34 +03:00
parent bb3152ac8b
commit 14c471fe5d

View File

@ -23,23 +23,6 @@ namespace osu.Game.Overlays.Rankings.Tables
private readonly int page;
private readonly FillFlowContainer backgroundFlow;
public IReadOnlyList<TModel> Rankings
{
set
{
Content = null;
backgroundFlow.Clear();
if (value?.Any() != true)
return;
value.ForEach(_ => backgroundFlow.Add(new TableRowBackground()));
Columns = CreateHeaders();
Content = value.Select((s, i) => CreateContent(page * items_per_page - (items_per_page - i), s)).ToArray().ToRectangular();
}
}
protected RankingsTable(int page)
{
this.page = page;
@ -58,6 +41,23 @@ namespace osu.Game.Overlays.Rankings.Tables
});
}
public IReadOnlyList<TModel> Rankings
{
set
{
Content = null;
backgroundFlow.Clear();
if (value?.Any() != true)
return;
value.ForEach(_ => backgroundFlow.Add(new TableRowBackground()));
Columns = CreateHeaders();
Content = value.Select((s, i) => CreateContent(page * items_per_page - (items_per_page - i), s)).ToArray().ToRectangular();
}
}
protected abstract TableColumn[] CreateHeaders();
protected abstract Drawable[] CreateContent(int index, TModel item);