Fix URL button blocking the party button.
This commit is contained in:
committed by
abcdefg30
parent
921da2f19e
commit
79d786708b
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user