1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-15 15:27:20 +08:00

Move potentially expensive load to BDL

This commit is contained in:
Dean Herbert 2019-11-29 15:35:33 +09:00
parent 36d694ad2d
commit e678fe7a77

View File

@ -23,15 +23,25 @@ namespace osu.Game.Overlays.Rankings.Tables
private const float row_height = 25;
private const int items_per_page = 50;
private readonly int page;
private readonly IReadOnlyList<TModel> rankings;
protected RankingsTable(int page, IReadOnlyList<TModel> rankings)
{
FillFlowContainer backgroundFlow;
this.page = page;
this.rankings = rankings;
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Padding = new MarginPadding { Horizontal = horizontal_inset };
RowSize = new Dimension(GridSizeMode.Absolute, row_height);
}
[BackgroundDependencyLoader]
private void load()
{
FillFlowContainer backgroundFlow;
AddInternal(backgroundFlow = new FillFlowContainer
{