From e28e6b9b73555ac36319e3ebeefc5e0e9c4af008 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Wed, 5 Feb 2025 15:26:00 +0100 Subject: [PATCH] don't display dot when connected --- .../securesms/components/AvatarView.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/thoughtcrime/securesms/components/AvatarView.java b/src/main/java/org/thoughtcrime/securesms/components/AvatarView.java index c836af286..f90c1d2de 100644 --- a/src/main/java/org/thoughtcrime/securesms/components/AvatarView.java +++ b/src/main/java/org/thoughtcrime/securesms/components/AvatarView.java @@ -67,14 +67,13 @@ public class AvatarView extends ConstraintLayout { } public void setConnectivity(int connectivity) { + if (connectivity >= DcContext.DC_CONNECTIVITY_CONNECTED || connectivity >= DcContext.DC_CONNECTIVITY_WORKING) { + seenRecentlyIndicator.setVisibility(View.GONE); + return; + } + final int id; - String text = ""; - if (connectivity >= DcContext.DC_CONNECTIVITY_CONNECTED) { - id = R.color.status_dot_online; - } else if (connectivity >= DcContext.DC_CONNECTIVITY_WORKING) { - text = "⇅"; - id = R.color.status_dot_online; - } else if (connectivity >= DcContext.DC_CONNECTIVITY_CONNECTING) { + if (connectivity >= DcContext.DC_CONNECTIVITY_CONNECTING) { id = R.color.status_dot_connecting; } else { id = R.color.status_dot_offline; @@ -88,7 +87,7 @@ public class AvatarView extends ConstraintLayout { .fontSize(ViewUtil.dpToPx(getContext(), 23)) .bold() .endConfig() - .buildRound(text, getResources().getColor(id))); + .buildRound("", getResources().getColor(id))); seenRecentlyIndicator.setVisibility(View.VISIBLE); }