Fix URL button blocking the party button.

This commit is contained in:
Matthias Mailänder
2023-01-07 21:03:18 +01:00
committed by abcdefg30
parent 921da2f19e
commit 79d786708b

View File

@@ -115,6 +115,7 @@ namespace OpenRA.Mods.Common
DateTime? timestamp = null;
Party party = null;
Secrets secrets = null;
Button[] buttons = null;
switch (state)
{
@@ -161,6 +162,18 @@ namespace OpenRA.Mods.Common
throw new ArgumentOutOfRangeException(nameof(state), state, null);
}
if (party == null)
{
buttons = new[]
{
new Button
{
Label = "Visit Website",
Url = Game.ModData.Manifest.Metadata.Website
}
};
}
var richPresence = new RichPresence
{
Details = details,
@@ -173,14 +186,7 @@ namespace OpenRA.Mods.Common
Timestamps = timestamp.HasValue ? new Timestamps(timestamp.Value) : null,
Party = party,
Secrets = secrets,
Buttons = new[]
{
new Button
{
Label = "Visit Website",
Url = Game.ModData.Manifest.Metadata.Website
}
}
Buttons = buttons
};
client.SetPresence(richPresence);