Only fetch after initial pop in

This commit is contained in:
Dean Herbert 2019-05-17 17:49:05 +09:00
parent c41ec20236
commit 0b076c9ca0
1 changed files with 7 additions and 12 deletions

View File

@ -82,22 +82,12 @@ private void load(AudioManager audio, OsuColour colour)
sampleBack = audio.Sample.Get(@"UI/generic-select-soft");
}
protected override void LoadComplete()
{
base.LoadComplete();
fetchListing();
}
protected override void PopIn()
{
base.PopIn();
FadeEdgeEffectTo(0.25f, WaveContainer.APPEAR_DURATION, Easing.In);
}
protected override void PopOut()
{
base.PopOut();
FadeEdgeEffectTo(0, WaveContainer.DISAPPEAR_DURATION, Easing.Out);
if (!initialFetchPerformed)
fetchListing();
}
public override bool OnPressed(GlobalAction action)
@ -151,8 +141,12 @@ public void ShowBuild(APIChangelogBuild build)
loadContent(new ChangelogBuild(build));
}
private bool initialFetchPerformed;
private void fetchListing()
{
initialFetchPerformed = true;
var req = new GetChangelogRequest();
req.Success += res =>
{
@ -165,6 +159,7 @@ private void fetchListing()
ShowListing();
};
req.Failure += _ => initialFetchPerformed = false;
API.Queue(req);
}