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:
commit
c0cfd136dd
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user