From cf9ca3cc46c8aaceb13a21bdd258b5f4a8a63be1 Mon Sep 17 00:00:00 2001 From: kosyak Date: Sun, 6 Oct 2024 18:55:17 +0200 Subject: [PATCH] hide contact presence indicator when related account went offline --- .../eu/siacs/conversations/ui/widget/PresenceIndicator.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/widget/PresenceIndicator.kt b/src/main/java/eu/siacs/conversations/ui/widget/PresenceIndicator.kt index 12b12f60b..27af31796 100644 --- a/src/main/java/eu/siacs/conversations/ui/widget/PresenceIndicator.kt +++ b/src/main/java/eu/siacs/conversations/ui/widget/PresenceIndicator.kt @@ -52,7 +52,9 @@ class PresenceIndicator : View { } fun setStatus(contact: Contact?) { - val status = contact?.shownStatus + val status = contact?.shownStatus?.takeIf { + contact.account?.isOnlineAndConnected == true + } if (status != this.status) { this.status = status invalidate()