浏览代码

add default call iOS action if phone number was tapped

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

+ 3 - 0
deltachat-ios/Chat/ChatViewController.swift

@@ -1302,6 +1302,9 @@ extension ChatViewController: BaseMessageCellDelegate {
         if handleUIMenu() || handleSelection(indexPath: indexPath) {
             return
         }
+        if let phoneURL = URL(string: "tel://\(number)") {
+            UIApplication.shared.open(phoneURL, options: [:], completionHandler: nil)
+        }
         logger.debug("phone number tapped \(number)")
     }