mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09:00
Added "getIdFromUrl" call back to content.action because performance impact is small and no unnecessary id calculations are done
This commit is contained in:
parent
dcdc186a53
commit
319f43e209
@ -107,12 +107,11 @@ namespace osu.Game.Graphics.Sprites
|
|||||||
}
|
}
|
||||||
|
|
||||||
url = url.Substring(osuUrlIndex + 11);
|
url = url.Substring(osuUrlIndex + 11);
|
||||||
var id = getIdFromUrl(url);
|
|
||||||
if (url.StartsWith("s/") || url.StartsWith("beatmapsets/") || url.StartsWith("d/"))
|
if (url.StartsWith("s/") || url.StartsWith("beatmapsets/") || url.StartsWith("d/"))
|
||||||
content.Action = () => beatmapSetOverlay.ShowBeatmapSet(id);
|
content.Action = () => beatmapSetOverlay.ShowBeatmapSet(getIdFromUrl(url));
|
||||||
else if (url.StartsWith("b/") || url.StartsWith("beatmaps/"))
|
else if (url.StartsWith("b/") || url.StartsWith("beatmaps/"))
|
||||||
content.Action = () => beatmapSetOverlay.ShowBeatmap(id);
|
content.Action = () => beatmapSetOverlay.ShowBeatmap(getIdFromUrl(url));
|
||||||
else if (url.StartsWith("ss/"))
|
else
|
||||||
content.Action = () => Process.Start($"https://osu.ppy.sh/{url}");
|
content.Action = () => Process.Start($"https://osu.ppy.sh/{url}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user