mirror of
https://github.com/osukey/osukey.git
synced 2025-06-20 18:58:05 +09:00
Move bind LoadComplete
code out of constructor
This commit is contained in:
parent
673ca4c2a1
commit
489caebf59
@ -19,13 +19,18 @@ namespace osu.Game.Overlays.News
|
|||||||
{
|
{
|
||||||
TabControl.AddItem(front_page_string);
|
TabControl.AddItem(front_page_string);
|
||||||
|
|
||||||
|
article.BindValueChanged(onArticleChanged, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
Current.BindValueChanged(e =>
|
Current.BindValueChanged(e =>
|
||||||
{
|
{
|
||||||
if (e.NewValue == front_page_string)
|
if (e.NewValue == front_page_string)
|
||||||
ShowFrontPage?.Invoke();
|
ShowFrontPage?.Invoke();
|
||||||
});
|
});
|
||||||
|
|
||||||
article.BindValueChanged(onArticleChanged, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetFrontPage() => article.Value = null;
|
public void SetFrontPage() => article.Value = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user