mirror of
https://github.com/ppy/osu.git
synced 2026-05-21 05:09:57 +08:00
Merge pull request #9759 from EVAST9919/news-fix
Fix NewsOverlay running request on startup
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user