1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:07:25 +08:00

Fix wiki overlay not handling path redirection properly

This commit is contained in:
Salman Ahmed 2022-07-20 08:58:24 +03:00
parent e7f35701db
commit 474c1a8a7a

View File

@ -100,6 +100,11 @@ namespace osu.Game.Overlays
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();
request?.Cancel();
@ -121,6 +126,7 @@ namespace osu.Game.Overlays
private void onSuccess(APIWikiPage response)
{
wikiData.Value = response;
path.Value = response.Path;
if (response.Layout == index_path)
{