mirror of
https://github.com/osukey/osukey.git
synced 2025-06-14 15:58:06 +09: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)
|
if (getBeatmap(activity.Value) is IBeatmapInfo beatmap && beatmap.OnlineID > 0)
|
||||||
{
|
{
|
||||||
string rulesetShortName = (activity.Value as UserActivity.InGame)?.Ruleset.ShortName ?? string.Empty;
|
|
||||||
|
|
||||||
presence.Buttons = new[]
|
presence.Buttons = new[]
|
||||||
{
|
{
|
||||||
new Button
|
new Button
|
||||||
{
|
{
|
||||||
Label = "View beatmap",
|
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…
x
Reference in New Issue
Block a user