1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 22:33:05 +08:00

Merge pull request #9759 from EVAST9919/news-fix

Fix NewsOverlay running request on startup
This commit is contained in:
Dean Herbert 2020-08-05 20:24:17 +09:00 committed by GitHub
commit c0cfd136dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,7 +67,28 @@ namespace osu.Game.Overlays
protected override void LoadComplete()
{
base.LoadComplete();
article.BindValueChanged(onArticleChanged, true);
// should not be run until first pop-in to avoid requesting data before user views.
article.BindValueChanged(onArticleChanged);
}
private bool displayUpdateRequired = true;
protected override void PopIn()
{
base.PopIn();
if (displayUpdateRequired)
{
article.TriggerChange();
displayUpdateRequired = false;
}
}
protected override void PopOutComplete()
{
base.PopOutComplete();
displayUpdateRequired = true;
}
public void ShowFrontPage()