mirror of
https://github.com/osukey/osukey.git
synced 2025-05-19 12:37:38 +09:00
Fix wiki links containing locale not loading when opened from chat.
This commit is contained in:
parent
7be2d94b6a
commit
81a49057ec
@ -7,6 +7,7 @@ using System.Threading;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Extensions;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.API.Requests;
|
using osu.Game.Online.API.Requests;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
@ -100,7 +101,16 @@ namespace osu.Game.Overlays
|
|||||||
cancellationToken?.Cancel();
|
cancellationToken?.Cancel();
|
||||||
request?.Cancel();
|
request?.Cancel();
|
||||||
|
|
||||||
|
string[] values = e.NewValue.Split('/', 2);
|
||||||
|
|
||||||
|
if (values.Length > 1 && LanguageExtensions.TryParseCultureCode(values[0], out _))
|
||||||
|
{
|
||||||
|
request = new GetWikiRequest(values[1], values[0]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
request = new GetWikiRequest(e.NewValue);
|
request = new GetWikiRequest(e.NewValue);
|
||||||
|
}
|
||||||
|
|
||||||
Loading.Show();
|
Loading.Show();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user