diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java index b84286ae85..4675f15c4c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java @@ -417,7 +417,9 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity }); String nickname = DatabaseFactory.getStorage(this).getDisplayName(getRecipient().getAddress().serialize()); titleTextView.setText(nickname); - titleTextView.setSelection(nickname.length()); + if (nickname != null) { + titleTextView.setSelection(nickname.length()); + } imm.showSoftInput(v, 0); cancelButtonContainer.setVisibility(View.VISIBLE); } diff --git a/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/ProfileManager.kt b/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/ProfileManager.kt index 0332f1c474..ac8b13e865 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/ProfileManager.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/ProfileManager.kt @@ -21,6 +21,7 @@ class ProfileManager: SSKEnvironment.ProfileManagerProtocol { override fun setProfileName(context: Context, recipient: Recipient, profileName: String) { val database = DatabaseFactory.getRecipientDatabase(context) database.setProfileName(recipient, profileName) + recipient.notifyListeners() } override fun setProfilePictureURL(context: Context, recipient: Recipient, profilePictureURL: String) { diff --git a/libsession/src/main/java/org/session/libsession/messaging/threads/recipients/Recipient.java b/libsession/src/main/java/org/session/libsession/messaging/threads/recipients/Recipient.java index baa0ddae57..f3a0ee5a26 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/threads/recipients/Recipient.java +++ b/libsession/src/main/java/org/session/libsession/messaging/threads/recipients/Recipient.java @@ -288,7 +288,7 @@ public class Recipient implements RecipientModifiedListener { public synchronized @Nullable String getName() { String displayName = MessagingModuleConfiguration.shared.getStorage().getDisplayName(this.address.toString()); - if (displayName != null) { return displayName; } + if (displayName != null && !displayName.isEmpty()) { return displayName; } if (this.name == null && isMmsGroupRecipient()) { List names = new LinkedList<>();