mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-28 22:08:28 +00:00
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:
+5
@@ -775,6 +775,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
|
||||
|
||||
Reference in New Issue
Block a user