Преглед изворни кода

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)
     }