Explorar o código

archiveChat() already marks things as being notices; the extra call to marknoticedChat() is not needed when we update removeNotificationsForChat() after archiving

B. Petersen %!s(int64=3) %!d(string=hai) anos
pai
achega
2fed832a42
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      deltachat-ios/ViewModel/ChatListViewModel.swift

+ 1 - 2
deltachat-ios/ViewModel/ChatListViewModel.swift

@@ -183,11 +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 {
-            dcContext.marknoticedChat(chatId: chatId)
             NotificationManager.removeNotificationsForChat(dcContext: dcContext, chatId: chatId)
         }
-        dcContext.archiveChat(chatId: chatId, archive: !isArchivedBefore)
         updateChatList(notifyListener: false)
     }