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).
This commit is contained in:
Narasimha-sc
2026-06-18 14:21:37 +00:00
parent ab472ffc1f
commit 8440f17d57
@@ -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