mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-07 03:59:59 +00:00
ui: fix messages being sent in wrong scope after receiving an item in support scope (#5903)
This commit is contained in:
@@ -499,7 +499,11 @@ final class ChatModel: ObservableObject {
|
||||
|
||||
func updateChatInfo(_ cInfo: ChatInfo) {
|
||||
if let i = getChatIndex(cInfo.id) {
|
||||
chats[i].chatInfo = cInfo
|
||||
if case let .group(groupInfo, groupChatScope) = cInfo, groupChatScope != nil {
|
||||
chats[i].chatInfo = .group(groupInfo: groupInfo, groupChatScope: nil)
|
||||
} else {
|
||||
chats[i].chatInfo = cInfo
|
||||
}
|
||||
chats[i].created = Date.now
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,6 +355,8 @@ object ChatModel {
|
||||
)
|
||||
)
|
||||
}
|
||||
} else if (currentCInfo is ChatInfo.Group && newCInfo is ChatInfo.Group && newCInfo.groupChatScope != null) {
|
||||
newCInfo = newCInfo.copy(groupInfo = newCInfo.groupInfo, groupChatScope = null)
|
||||
}
|
||||
chats[i] = chats[i].copy(chatInfo = newCInfo)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user