From 516410a8993a81fcfae07e4bd9ad9dd01cdf603f Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Fri, 12 Jan 2024 20:54:26 +0400 Subject: [PATCH] android, desktop: align member name functions with ios (fixes issue with displaying unknown members) (#3680) --- .../kotlin/chat/simplex/common/model/ChatModel.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt index 72150e55e..e96a385df 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt @@ -1263,7 +1263,8 @@ data class GroupMember ( val id: String get() = "#$groupId @$groupMemberId" val displayName: String get() { - val name = memberProfile.localAlias.ifEmpty { memberProfile.displayName } + val p = memberProfile + val name = p.localAlias.ifEmpty { p.displayName } return pastMember(name) } val fullName: String get() = memberProfile.fullName @@ -1273,7 +1274,8 @@ data class GroupMember ( val chatViewName: String get() { - val name = memberProfile.localAlias.ifEmpty { displayName + (if (fullName == "" || fullName == displayName) "" else " / $fullName") } + val p = memberProfile + val name = p.localAlias.ifEmpty { p.displayName + (if (p.fullName == "" || p.fullName == p.displayName) "" else " / ${p.fullName}") } return pastMember(name) }