mirror of https://github.com/ppy/osu
Push private methods down
This commit is contained in:
parent
3ff97f787a
commit
6e4730652e
|
@ -36,6 +36,52 @@ public WikiOverlay()
|
|||
{
|
||||
}
|
||||
|
||||
public void ShowPage(string pagePath = index_path)
|
||||
{
|
||||
path.Value = pagePath.Trim('/');
|
||||
Show();
|
||||
}
|
||||
|
||||
protected override WikiHeader CreateHeader() => new WikiHeader
|
||||
{
|
||||
ShowIndexPage = () => ShowPage(),
|
||||
ShowParentPage = showParentPage,
|
||||
};
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
path.BindValueChanged(onPathChanged);
|
||||
wikiData.BindTo(Header.WikiPageData);
|
||||
}
|
||||
|
||||
protected override void PopIn()
|
||||
{
|
||||
base.PopIn();
|
||||
|
||||
if (displayUpdateRequired)
|
||||
{
|
||||
path.TriggerChange();
|
||||
displayUpdateRequired = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void PopOutComplete()
|
||||
{
|
||||
base.PopOutComplete();
|
||||
displayUpdateRequired = true;
|
||||
}
|
||||
|
||||
protected void LoadDisplay(Drawable display)
|
||||
{
|
||||
ScrollFlow.ScrollToStart();
|
||||
LoadComponentAsync(display, loaded =>
|
||||
{
|
||||
Child = loaded;
|
||||
Loading.Hide();
|
||||
}, (cancellationToken = new CancellationTokenSource()).Token);
|
||||
}
|
||||
|
||||
private void onPathChanged(ValueChangedEvent<string> e)
|
||||
{
|
||||
cancellationToken?.Cancel();
|
||||
|
@ -92,52 +138,6 @@ private void showParentPage()
|
|||
ShowPage(parentPath);
|
||||
}
|
||||
|
||||
public void ShowPage(string pagePath = index_path)
|
||||
{
|
||||
path.Value = pagePath.Trim('/');
|
||||
Show();
|
||||
}
|
||||
|
||||
protected override WikiHeader CreateHeader() => new WikiHeader
|
||||
{
|
||||
ShowIndexPage = () => ShowPage(),
|
||||
ShowParentPage = showParentPage,
|
||||
};
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
path.BindValueChanged(onPathChanged);
|
||||
wikiData.BindTo(Header.WikiPageData);
|
||||
}
|
||||
|
||||
protected override void PopIn()
|
||||
{
|
||||
base.PopIn();
|
||||
|
||||
if (displayUpdateRequired)
|
||||
{
|
||||
path.TriggerChange();
|
||||
displayUpdateRequired = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void PopOutComplete()
|
||||
{
|
||||
base.PopOutComplete();
|
||||
displayUpdateRequired = true;
|
||||
}
|
||||
|
||||
protected void LoadDisplay(Drawable display)
|
||||
{
|
||||
ScrollFlow.ScrollToStart();
|
||||
LoadComponentAsync(display, loaded =>
|
||||
{
|
||||
Child = loaded;
|
||||
Loading.Hide();
|
||||
}, (cancellationToken = new CancellationTokenSource()).Token);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
cancellationToken?.Cancel();
|
||||
|
|
Loading…
Reference in New Issue