From 0b076c9ca0807f2c4e2e38c17c5b85064cee5464 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 17 May 2019 17:49:05 +0900 Subject: [PATCH] Only fetch after initial pop in --- osu.Game/Overlays/ChangelogOverlay.cs | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/osu.Game/Overlays/ChangelogOverlay.cs b/osu.Game/Overlays/ChangelogOverlay.cs index b8449f618d..f4c0338436 100644 --- a/osu.Game/Overlays/ChangelogOverlay.cs +++ b/osu.Game/Overlays/ChangelogOverlay.cs @@ -82,22 +82,12 @@ namespace osu.Game.Overlays 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 @@ namespace osu.Game.Overlays loadContent(new ChangelogBuild(build)); } + private bool initialFetchPerformed; + private void fetchListing() { + initialFetchPerformed = true; + var req = new GetChangelogRequest(); req.Success += res => { @@ -165,6 +159,7 @@ namespace osu.Game.Overlays ShowListing(); }; + req.Failure += _ => initialFetchPerformed = false; API.Queue(req); }