mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 03:25:11 +08:00
Fix wiki overlay not handling path redirection properly
This commit is contained in:
parent
e7f35701db
commit
474c1a8a7a
@ -100,6 +100,11 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
private void onPathChanged(ValueChangedEvent<string> e)
|
private void onPathChanged(ValueChangedEvent<string> e)
|
||||||
{
|
{
|
||||||
|
// the path could change as a result of redirecting to another path cof the same page.
|
||||||
|
// we already have the correct wiki data, so we can safely return here.
|
||||||
|
if (e.NewValue == wikiData.Value?.Path)
|
||||||
|
return;
|
||||||
|
|
||||||
cancellationToken?.Cancel();
|
cancellationToken?.Cancel();
|
||||||
request?.Cancel();
|
request?.Cancel();
|
||||||
|
|
||||||
@ -121,6 +126,7 @@ namespace osu.Game.Overlays
|
|||||||
private void onSuccess(APIWikiPage response)
|
private void onSuccess(APIWikiPage response)
|
||||||
{
|
{
|
||||||
wikiData.Value = response;
|
wikiData.Value = response;
|
||||||
|
path.Value = response.Path;
|
||||||
|
|
||||||
if (response.Layout == index_path)
|
if (response.Layout == index_path)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user