Explorar el Código

remove notifications if chat has been deleted fomr ContactDetailViewController and GroupChatDetailViewController

cyberta hace 4 años
padre
commit
b6527f7fb9

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