mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-21 04:41:36 +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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user