소스 검색

remove notifications if chat has been deleted fomr ContactDetailViewController and GroupChatDetailViewController

cyberta 4 년 전
부모
커밋
b6527f7fb9
2개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      deltachat-ios/Controller/ContactDetailViewController.swift
  2. 1 0
      deltachat-ios/Controller/GroupChatDetailViewController.swift

+ 1 - 0
deltachat-ios/Controller/ContactDetailViewController.swift

@@ -420,6 +420,7 @@ class ContactDetailViewController: UITableViewController {
             return
         }
         viewModel.context.deleteChat(chatId: viewModel.chatId)
+        NotificationManager.removeNotificationsForChat(chatId: viewModel.chatId)
 
         // just pop to viewControllers - we've in chatlist or archive then
         // (no not use `navigationController?` here: popping self will make the reference becoming nil)

+ 1 - 0
deltachat-ios/Controller/GroupChatDetailViewController.swift

@@ -330,6 +330,7 @@ class GroupChatDetailViewController: UIViewController {
 
     private func deleteChat() {
         dcContext.deleteChat(chatId: chatId)
+        NotificationManager.removeNotificationsForChat(chatId: chatId)
 
         // just pop to viewControllers - we've in chatlist or archive then
         // (no not use `navigationController?` here: popping self will make the reference becoming nil)