mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:20:04 +08:00
Always use current ruleset to ensure URL is valid
This commit is contained in:
parent
1951eb30bc
commit
c55c7becba
@ -103,14 +103,12 @@ namespace osu.Desktop
|
||||
|
||||
if (getBeatmap(activity.Value) is IBeatmapInfo beatmap && beatmap.OnlineID > 0)
|
||||
{
|
||||
string rulesetShortName = (activity.Value as UserActivity.InGame)?.Ruleset.ShortName ?? string.Empty;
|
||||
|
||||
presence.Buttons = new[]
|
||||
{
|
||||
new Button
|
||||
{
|
||||
Label = "View beatmap",
|
||||
Url = $@"{api.WebsiteRootUrl}/beatmapsets/{beatmap.BeatmapSet?.OnlineID}#{rulesetShortName}/{beatmap.OnlineID}"
|
||||
Url = $@"{api.WebsiteRootUrl}/beatmapsets/{beatmap.BeatmapSet?.OnlineID}#{ruleset.Value.ShortName}/{beatmap.OnlineID}"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user