浏览代码

remove unused observer and don't show context menu for info messages

cyberta 4 年之前
父节点
当前提交
9a97eac0d1
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. 1 6
      deltachat-ios/Chat/ChatViewControllerNew.swift

+ 1 - 6
deltachat-ios/Chat/ChatViewControllerNew.swift

@@ -912,15 +912,10 @@ class ChatViewControllerNew: UITableViewController {
             UIMenuItem(title: String.localized("forward"), action: #selector(BaseMessageCell.messageForward))
             UIMenuItem(title: String.localized("forward"), action: #selector(BaseMessageCell.messageForward))
         ]
         ]
         UIMenuController.shared.update()
         UIMenuController.shared.update()
-        NotificationCenter.default.addObserver(self, selector: #selector(ChatViewControllerNew.menuWillShow),
-                                               name: UIMenuController.willShowMenuNotification, object: nil)
     }
     }
 
 
     override func tableView(_ tableView: UITableView, shouldShowMenuForRowAt indexPath: IndexPath) -> Bool {
     override func tableView(_ tableView: UITableView, shouldShowMenuForRowAt indexPath: IndexPath) -> Bool {
-        return true
-    }
-
-    @objc func menuWillShow(notification: NSNotification) {
+        return !DcMsg(id: messageIds[indexPath.row]).isInfo 
     }
     }
 
 
     override func tableView(_ tableView: UITableView, canPerformAction action: Selector, forRowAt indexPath: IndexPath, withSender sender: Any?) -> Bool {
     override func tableView(_ tableView: UITableView, canPerformAction action: Selector, forRowAt indexPath: IndexPath, withSender sender: Any?) -> Bool {