瀏覽代碼

restore old behavior that group or contact profile gets dismissed after mute button was toggled

cyberta 3 年之前
父節點
當前提交
9d9d4e0f2e

+ 2 - 2
deltachat-ios/Controller/ContactDetailViewController.swift

@@ -357,7 +357,7 @@ class ContactDetailViewController: UITableViewController {
         if viewModel.chatIsMuted {
             self.viewModel.context.setChatMuteDuration(chatId: self.viewModel.chatId, duration: 0)
             headerCell.setMuted(isMuted: viewModel.chatIsMuted)
-            // self.navigationController?.popViewController(animated: true)
+            self.navigationController?.popViewController(animated: true)
         } else {
             showMuteAlert()
         }
@@ -421,7 +421,7 @@ class ContactDetailViewController: UITableViewController {
         let action = UIAlertAction(title: String.localized(key), style: .default, handler: { _ in
             self.viewModel.context.setChatMuteDuration(chatId: self.viewModel.chatId, duration: duration)
             self.headerCell.setMuted(isMuted: self.viewModel.chatIsMuted)
-            // self.navigationController?.popViewController(animated: true)
+            self.navigationController?.popViewController(animated: true)
         })
         alert.addAction(action)
     }

+ 2 - 2
deltachat-ios/Controller/GroupChatDetailViewController.swift

@@ -343,7 +343,7 @@ class GroupChatDetailViewController: UIViewController {
         if chat.isMuted {
             dcContext.setChatMuteDuration(chatId: chatId, duration: 0)
             groupHeader.setMuted(isMuted: false)
-            // navigationController?.popViewController(animated: true)
+            navigationController?.popViewController(animated: true)
         } else {
             showMuteAlert()
         }
@@ -674,7 +674,7 @@ extension GroupChatDetailViewController {
         let action = UIAlertAction(title: String.localized(key), style: .default, handler: { _ in
             self.dcContext.setChatMuteDuration(chatId: self.chatId, duration: duration)
             self.groupHeader.setMuted(isMuted: true)
-            // self.navigationController?.popViewController(animated: true)
+            self.navigationController?.popViewController(animated: true)
         })
         alert.addAction(action)
     }