ios: navigation to delete chat working for group members

This commit is contained in:
Diogo Cunha
2024-08-12 01:02:22 +01:00
parent e20a4e54c3
commit 4a31dcd319
3 changed files with 7 additions and 11 deletions
+1 -7
View File
@@ -340,13 +340,7 @@ func loadChat(chat: Chat, search: String = "") {
m.chatItemStatuses = [:]
im.reversedChatItems = []
let chat = try apiGetChat(type: cInfo.chatType, id: cInfo.apiId, search: search)
if case let .direct(contact) = chat.chatInfo, !cInfo.chatDeleted, chat.chatInfo.chatDeleted {
var updatedContact = contact
updatedContact.chatDeleted = false
m.updateContact(updatedContact)
} else {
m.updateChatInfo(chat.chatInfo)
}
m.updateChatInfo(chat.chatInfo)
im.reversedChatItems = chat.chatItems.reversed()
} catch let error {
logger.error("loadChat error: \(responseError(error))")