mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 02:12:25 +00:00
ui: update member support chats list from delete responses
This commit is contained in:
1 parent
74399a833e
commit
67422bbbc3
3 files changed
+7
-1
No files matched your search
@@ -2836,6 +2836,7 @@ struct ChatView: View {
|
||||
m.decreaseGroupReportsCounter(chat.chatInfo.id)
|
||||
}
|
||||
m.updateChatInfo(itemDeletion.deletedChatItem.chatInfo)
|
||||
m.upsertSupportChatMember(itemDeletion.deletedChatItem.chatInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3040,6 +3041,7 @@ private func deleteMessages(_ chat: Chat, _ deletingItems: [Int64], _ mode: CIDe
|
||||
}
|
||||
if let updatedChatInfo = deletedItems.last?.deletedChatItem.chatInfo {
|
||||
ChatModel.shared.updateChatInfo(updatedChatInfo)
|
||||
ChatModel.shared.upsertSupportChatMember(updatedChatInfo)
|
||||
}
|
||||
}
|
||||
await onSuccess()
|
||||
@@ -3078,6 +3080,7 @@ func archiveReports(_ chat: Chat, _ itemIds: [Int64], _ forAll: Bool, _ onSucces
|
||||
}
|
||||
if let updatedChatInfo = deleted.last?.deletedChatItem.chatInfo {
|
||||
ChatModel.shared.updateChatInfo(updatedChatInfo)
|
||||
ChatModel.shared.upsertSupportChatMember(updatedChatInfo)
|
||||
}
|
||||
}
|
||||
await onSuccess()
|
||||
|
||||
+3
@@ -573,6 +573,7 @@ fun ChatView(
|
||||
chatModel.chatsContext.decreaseGroupReportsCounter(chatRh, chatInfo.id)
|
||||
}
|
||||
chatModel.chatsContext.updateChatInfo(chatRh, deleted.deletedChatItem.chatInfo)
|
||||
chatModel.upsertSupportChatMember(chatRh, deleted.deletedChatItem.chatInfo)
|
||||
}
|
||||
withContext(Dispatchers.Main) {
|
||||
if (toChatItem != null) {
|
||||
@@ -3404,6 +3405,7 @@ private fun deleteMessages(chatRh: Long?, chatInfo: ChatInfo, itemIds: List<Long
|
||||
}
|
||||
deleted.lastOrNull()?.deletedChatItem?.chatInfo?.let { updatedChatInfo ->
|
||||
chatModel.chatsContext.updateChatInfo(chatRh, updatedChatInfo)
|
||||
chatModel.upsertSupportChatMember(chatRh, updatedChatInfo)
|
||||
}
|
||||
}
|
||||
withContext(Dispatchers.Main) {
|
||||
@@ -3441,6 +3443,7 @@ private fun archiveReports(chatRh: Long?, chatInfo: ChatInfo, itemIds: List<Long
|
||||
}
|
||||
deleted.lastOrNull()?.deletedChatItem?.chatInfo?.let { updatedChatInfo ->
|
||||
chatModel.chatsContext.updateChatInfo(chatRh, updatedChatInfo)
|
||||
chatModel.upsertSupportChatMember(chatRh, updatedChatInfo)
|
||||
}
|
||||
}
|
||||
withContext(Dispatchers.Main) {
|
||||
|
||||
Reference in new issue
Block a user