|
@@ -183,10 +183,10 @@ class ChatListViewModel: NSObject {
|
|
|
func archiveChatToggle(chatId: Int) {
|
|
|
let chat = dcContext.getChat(chatId: chatId)
|
|
|
let isArchivedBefore = chat.isArchived
|
|
|
+ dcContext.archiveChat(chatId: chatId, archive: !isArchivedBefore)
|
|
|
if !isArchivedBefore {
|
|
|
NotificationManager.removeNotificationsForChat(dcContext: dcContext, chatId: chatId)
|
|
|
}
|
|
|
- dcContext.archiveChat(chatId: chatId, archive: !isArchivedBefore)
|
|
|
updateChatList(notifyListener: false)
|
|
|
}
|
|
|
|