From 86ea104e01f98df417079bc64d21db0841a800dd Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Fri, 18 Sep 2020 09:19:47 +1000 Subject: [PATCH] Fix display name bug --- src/org/thoughtcrime/securesms/loki/views/ProfilePictureView.kt | 2 +- src/org/thoughtcrime/securesms/loki/views/UserView.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/thoughtcrime/securesms/loki/views/ProfilePictureView.kt b/src/org/thoughtcrime/securesms/loki/views/ProfilePictureView.kt index f27c38ad97..311739d44d 100644 --- a/src/org/thoughtcrime/securesms/loki/views/ProfilePictureView.kt +++ b/src/org/thoughtcrime/securesms/loki/views/ProfilePictureView.kt @@ -65,7 +65,7 @@ class ProfilePictureView : RelativeLayout { if (result == null && publicChat != null) { result = DatabaseFactory.getLokiUserDatabase(context).getServerDisplayName(publicChat.id, publicKey) } - return result + return result ?: publicKey } } if (recipient.isGroupRecipient) { diff --git a/src/org/thoughtcrime/securesms/loki/views/UserView.kt b/src/org/thoughtcrime/securesms/loki/views/UserView.kt index 01455b9c00..21af19baa1 100644 --- a/src/org/thoughtcrime/securesms/loki/views/UserView.kt +++ b/src/org/thoughtcrime/securesms/loki/views/UserView.kt @@ -59,7 +59,7 @@ class UserView : LinearLayout { if (result == null && publicChat != null) { result = DatabaseFactory.getLokiUserDatabase(context).getServerDisplayName(publicChat.id, publicKey) } - return result + return result ?: publicKey } } val address = user.address.serialize()