浏览代码

Call marknoticedChat() for a chat that is going to be archived. It resets all fresh messages of that chat. This way the app badge counter doesn't take archived messages into account

cyberta 3 年之前
父节点
当前提交
d4dff6d8b1
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      deltachat-ios/ViewModel/ChatListViewModel.swift

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

@@ -184,6 +184,7 @@ class ChatListViewModel: NSObject {
         let chat = dcContext.getChat(chatId: chatId)
         let isArchivedBefore = chat.isArchived
         if !isArchivedBefore {
+            dcContext.marknoticedChat(chatId: chatId)
             NotificationManager.removeNotificationsForChat(dcContext: dcContext, chatId: chatId)
         }
         dcContext.archiveChat(chatId: chatId, archive: !isArchivedBefore)