mirror of https://github.com/ppy/osu
Added required changes.
This commit is contained in:
parent
e65826979e
commit
5276300c08
|
@ -97,7 +97,7 @@ private void updateStatus()
|
|||
presence.State = truncate(activity.Value.Status);
|
||||
presence.Details = truncate(getDetails(activity.Value));
|
||||
|
||||
if (getOnlineID(activity.Value) != string.Empty)
|
||||
if (getOnlineID(activity.Value) != null)
|
||||
{
|
||||
presence.Buttons = new Button[]
|
||||
{
|
||||
|
@ -167,18 +167,14 @@ private string getDetails(UserActivity activity)
|
|||
return string.Empty;
|
||||
}
|
||||
|
||||
private string getOnlineID(UserActivity activity)
|
||||
private int? getOnlineID(UserActivity activity)
|
||||
{
|
||||
switch (activity)
|
||||
if (activity is UserActivity.InGame game && game.BeatmapInfo.OnlineID > 0)
|
||||
{
|
||||
case UserActivity.InGame game:
|
||||
if (!(game.BeatmapInfo.OnlineID < 1))
|
||||
return game.BeatmapInfo.OnlineID.ToString();
|
||||
|
||||
return string.Empty;
|
||||
return game.BeatmapInfo.OnlineID;
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
return null;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
|
|
Loading…
Reference in New Issue