From 8440f17d57a71f975704300ca8e8d3868cfc33f1 Mon Sep 17 00:00:00 2001 From: Narasimha-sc <166327228+Narasimha-sc@users.noreply.github.com> Date: Thu, 18 Jun 2026 14:21:37 +0000 Subject: [PATCH] android, desktop: reflect a pending invitee's support-message edit in the main chat list preview Editing in a member-support scope calls upsertChatItem on the active (secondary) context only, so the primary context that owns the main-list preview was never updated (same asymmetry as sends). Also update the primary context on edit when the active context is a member-support scope. iOS is unaffected (single chats list). --- .../kotlin/chat/simplex/common/views/chat/ComposeView.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ComposeView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ComposeView.kt index 26824cdd49..e30a451203 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ComposeView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ComposeView.kt @@ -760,6 +760,11 @@ fun ComposeView( if (updatedItem != null) { withContext(Dispatchers.Main) { chatsCtx.upsertChatItem(chat.remoteHostId, cInfo, updatedItem.chatItem) + // an edit in a member-support scope is added only to the active (secondary) context; also + // update the primary context so the main chat list preview reflects the edit (like the send path) + if (chatsCtx.secondaryContextFilter is SecondaryContextFilter.GroupChatScopeContext) { + chatModel.chatsContext.upsertChatItem(chat.remoteHostId, cInfo, updatedItem.chatItem) + } } } return updatedItem?.chatItem