Naming adjustments

This commit is contained in:
Andrei Zavatski
2020-02-05 12:14:24 +03:00
parent fa65e3a5bb
commit 2b0b789980

View File

@ -27,7 +27,7 @@ namespace osu.Game.Overlays
private readonly Bindable<APISpotlight> spotlight = new Bindable<APISpotlight>(); private readonly Bindable<APISpotlight> spotlight = new Bindable<APISpotlight>();
private readonly BasicScrollContainer scrollFlow; private readonly BasicScrollContainer scrollFlow;
private readonly Container tableContainer; private readonly Container contentContainer;
private readonly DimmedLoadingLayer loading; private readonly DimmedLoadingLayer loading;
private readonly Box background; private readonly Box background;
private readonly RankingsOverlayHeader header; private readonly RankingsOverlayHeader header;
@ -74,7 +74,7 @@ namespace osu.Game.Overlays
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Children = new Drawable[] Children = new Drawable[]
{ {
tableContainer = new Container contentContainer = new Container
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
@ -160,12 +160,12 @@ namespace osu.Game.Overlays
if (request == null) if (request == null)
{ {
loadTable(null); loadContent(null);
return; return;
} }
request.Success += () => loadTable(createTableFromResponse(request)); request.Success += () => loadContent(createContentFromResponse(request));
request.Failure += _ => loadTable(null); request.Failure += _ => loadContent(null);
api.Queue(request); api.Queue(request);
} }
@ -189,7 +189,7 @@ namespace osu.Game.Overlays
return null; return null;
} }
private Drawable createTableFromResponse(APIRequest request) private Drawable createContentFromResponse(APIRequest request)
{ {
switch (request) switch (request)
{ {
@ -215,21 +215,21 @@ namespace osu.Game.Overlays
return null; return null;
} }
private void loadTable(Drawable table) private void loadContent(Drawable content)
{ {
scrollFlow.ScrollToStart(); scrollFlow.ScrollToStart();
if (table == null) if (content == null)
{ {
tableContainer.Clear(); contentContainer.Clear();
loading.Hide(); loading.Hide();
return; return;
} }
LoadComponentAsync(table, t => LoadComponentAsync(content, t =>
{ {
loading.Hide(); loading.Hide();
tableContainer.Child = table; contentContainer.Child = content;
}, (cancellationToken = new CancellationTokenSource()).Token); }, (cancellationToken = new CancellationTokenSource()).Token);
} }
} }