Combine conditionals and remove "InLobby" check

This commit is contained in:
Salman Ahmed 2024-02-28 07:58:02 +03:00
parent e2a364332b
commit c69c881cd3
1 changed files with 2 additions and 3 deletions

View File

@ -94,11 +94,10 @@ private void updateStatus()
if (activity.Value != null) if (activity.Value != null)
{ {
bool hideIdentifiableInformation = privacyMode.Value == DiscordRichPresenceMode.Limited; bool hideIdentifiableInformation = privacyMode.Value == DiscordRichPresenceMode.Limited || status.Value == UserStatus.DoNotDisturb;
bool hideInteractions = status.Value == UserStatus.DoNotDisturb && activity.Value is UserActivity.InLobby;
presence.State = truncate(activity.Value.GetStatus(hideIdentifiableInformation)); presence.State = truncate(activity.Value.GetStatus(hideIdentifiableInformation));
presence.Details = truncate(activity.Value.GetDetails(hideIdentifiableInformation || hideInteractions) ?? string.Empty); presence.Details = truncate(activity.Value.GetDetails(hideIdentifiableInformation) ?? string.Empty);
if (getBeatmapID(activity.Value) is int beatmapId && beatmapId > 0) if (getBeatmapID(activity.Value) is int beatmapId && beatmapId > 0)
{ {