From dc7cbe6c62c113b735273687b201e53730f77341 Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Tue, 3 Nov 2026 12:34:09 +0000 Subject: [PATCH] android, desktop: show members who left as left in member info (#8011) Co-authored-by: spacedandy-agents-simplex <342056592+spacedandy-agents-simplex@users.noreply.github.com> --- .../kotlin/chat/simplex/common/views/chat/ChatView.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt index eacfb37e87..f4a8f3f182 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt @@ -536,14 +536,16 @@ fun ChatView( val stats = r?.second val (updatedMember, code) = if ((member.memberActive || (groupInfo.useRelays && member.memberCurrent)) && member.memberRole != GroupMemberRole.Relay) { val memCode = chatModel.controller.apiGetGroupMemberCode(chatRh, groupInfo.apiId, member.groupMemberId) - (memCode?.first ?: r?.first ?: member) to memCode?.second + (memCode?.first ?: r?.first) to memCode?.second } else { - (r?.first ?: member) to null + r?.first to null } if (!isActive || chatModel.chatId.value != groupInfo.id) return@launch // members are not loaded in large groups, so only the opened member is added to the model - withContext(Dispatchers.Main) { - chatModel.chatsContext.upsertGroupMember(chatRh, groupInfo, updatedMember) + if (updatedMember != null) { + withContext(Dispatchers.Main) { + chatModel.chatsContext.upsertGroupMember(chatRh, groupInfo, updatedMember) + } } connStats.value = stats connectionCode.value = code