diff --git a/apps/ios/Shared/Views/Chat/ChatView.swift b/apps/ios/Shared/Views/Chat/ChatView.swift index d18d8ae145..812a6d214e 100644 --- a/apps/ios/Shared/Views/Chat/ChatView.swift +++ b/apps/ios/Shared/Views/Chat/ChatView.swift @@ -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() diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt index 66ded0b2a8..b84fc1e693 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt @@ -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 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 chatModel.chatsContext.updateChatInfo(chatRh, updatedChatInfo) + chatModel.upsertSupportChatMember(chatRh, updatedChatInfo) } } withContext(Dispatchers.Main) { diff --git a/plans/member-support-list-events.md b/plans/member-support-list-events.md index 78436ef7aa..cb76143a65 100644 --- a/plans/member-support-list-events.md +++ b/plans/member-support-list-events.md @@ -39,6 +39,7 @@ Load the list once per open group, then keep it current from what arrives. - It is called for: - `NewChatItems` events; - `ChatItemsDeleted` events; + - delete responses (items and reports); - send responses (Kotlin only); - the mark-read response; - the initial load of a support chat. @@ -51,7 +52,6 @@ A member's first support message arrives as a `NewChatItems` event with that mem ## Not covered - On iOS, `apiSendMessages` returns bare `ChatItem`s without chat info. The list's last-activity order after the user's own reply updates only when the group is reopened. -- API-response deletions made by the user themselves are not hooked. Only deletion events are. Items the user deletes are normally already read. ## Alternatives considered