소스 검색

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

B. Petersen 3 년 전
부모
커밋
2fed832a42
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  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)
     }