mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
fix crash & empty nickname bug
This commit is contained in:
parent
a1edfb13ee
commit
e64ac14b77
@ -417,7 +417,9 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
});
|
||||
String nickname = DatabaseFactory.getStorage(this).getDisplayName(getRecipient().getAddress().serialize());
|
||||
titleTextView.setText(nickname);
|
||||
if (nickname != null) {
|
||||
titleTextView.setSelection(nickname.length());
|
||||
}
|
||||
imm.showSoftInput(v, 0);
|
||||
cancelButtonContainer.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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<String> names = new LinkedList<>();
|
||||
|
Loading…
Reference in New Issue
Block a user