From 323c5f246f699cd63dc0f46df15ea012dcbe6d4a Mon Sep 17 00:00:00 2001 From: moezbhatti Date: Thu, 31 Oct 2019 00:32:50 -0400 Subject: [PATCH] Fix avatars not working --- .../src/main/java/com/moez/QKSMS/common/widget/AvatarView.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presentation/src/main/java/com/moez/QKSMS/common/widget/AvatarView.kt b/presentation/src/main/java/com/moez/QKSMS/common/widget/AvatarView.kt index 12fcf47e..a5b2ca15 100644 --- a/presentation/src/main/java/com/moez/QKSMS/common/widget/AvatarView.kt +++ b/presentation/src/main/java/com/moez/QKSMS/common/widget/AvatarView.kt @@ -94,7 +94,7 @@ class AvatarView @JvmOverloads constructor( lookupKey = contact?.lookupKey name = contact?.name // If a contactAddress has been given, we use it. Use the contact address otherwise. - address = contactAddress ?: contact?.numbers?.firstOrNull()?.address + address = contactAddress?.takeIf { it.isNotEmpty() } ?: contact?.numbers?.firstOrNull()?.address lastUpdated = contact?.lastUpdate updateView() }