mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09:00
Only fetch after initial pop in
This commit is contained in:
parent
c41ec20236
commit
0b076c9ca0
@ -82,22 +82,12 @@ namespace osu.Game.Overlays
|
|||||||
sampleBack = audio.Sample.Get(@"UI/generic-select-soft");
|
sampleBack = audio.Sample.Get(@"UI/generic-select-soft");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
fetchListing();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
base.PopIn();
|
base.PopIn();
|
||||||
FadeEdgeEffectTo(0.25f, WaveContainer.APPEAR_DURATION, Easing.In);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void PopOut()
|
if (!initialFetchPerformed)
|
||||||
{
|
fetchListing();
|
||||||
base.PopOut();
|
|
||||||
FadeEdgeEffectTo(0, WaveContainer.DISAPPEAR_DURATION, Easing.Out);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool OnPressed(GlobalAction action)
|
public override bool OnPressed(GlobalAction action)
|
||||||
@ -151,8 +141,12 @@ namespace osu.Game.Overlays
|
|||||||
loadContent(new ChangelogBuild(build));
|
loadContent(new ChangelogBuild(build));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool initialFetchPerformed;
|
||||||
|
|
||||||
private void fetchListing()
|
private void fetchListing()
|
||||||
{
|
{
|
||||||
|
initialFetchPerformed = true;
|
||||||
|
|
||||||
var req = new GetChangelogRequest();
|
var req = new GetChangelogRequest();
|
||||||
req.Success += res =>
|
req.Success += res =>
|
||||||
{
|
{
|
||||||
@ -165,6 +159,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
ShowListing();
|
ShowListing();
|
||||||
};
|
};
|
||||||
|
req.Failure += _ => initialFetchPerformed = false;
|
||||||
|
|
||||||
API.Queue(req);
|
API.Queue(req);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user