From 1e014a690f80b4b1af34166c44134dc14266f4c5 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Wed, 22 Jan 2020 15:28:39 +1100 Subject: [PATCH] Clean --- res/layout/conversation_activity.xml | 2 ++ .../securesms/conversation/ConversationActivity.java | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/res/layout/conversation_activity.xml b/res/layout/conversation_activity.xml index 31c914f0ee..8acd2e172c 100644 --- a/res/layout/conversation_activity.xml +++ b/res/layout/conversation_activity.xml @@ -57,6 +57,8 @@ android:id="@+id/subtitleTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:maxLines="1" + android:ellipsize="end" android:text="26 members" android:textColor="@color/text" android:textSize="@dimen/small_font_size" /> diff --git a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java index e13ed2286a..bb913fdfb3 100644 --- a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java @@ -237,6 +237,7 @@ import org.whispersystems.signalservice.loki.api.PairingAuthorisation; import org.whispersystems.signalservice.loki.messaging.LokiMessageFriendRequestStatus; import org.whispersystems.signalservice.loki.messaging.LokiThreadFriendRequestStatus; import org.whispersystems.signalservice.loki.messaging.Mention; +import org.whispersystems.signalservice.loki.utilities.PublicKeyValidation; import java.io.IOException; import java.text.SimpleDateFormat; @@ -3147,9 +3148,13 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity } else { actionBarSubtitleTextView.setText(userCount + " members"); } + } else if (PublicKeyValidation.isValid(recipient.getAddress().toString())) { + actionBarSubtitleTextView.setText(recipient.getAddress().toString()); } else { actionBarSubtitleTextView.setVisibility(View.GONE); } + } else if (PublicKeyValidation.isValid(recipient.getAddress().toString())) { + actionBarSubtitleTextView.setText(recipient.getAddress().toString()); } else { actionBarSubtitleTextView.setVisibility(View.GONE); }