mirror of
https://github.com/ppy/osu.git
synced 2025-03-14 05:47:20 +08: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.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Extensions;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.API.Requests;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
@ -100,7 +101,16 @@ namespace osu.Game.Overlays
|
||||
cancellationToken?.Cancel();
|
||||
request?.Cancel();
|
||||
|
||||
request = new GetWikiRequest(e.NewValue);
|
||||
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);
|
||||
}
|
||||
|
||||
Loading.Show();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user