Explorar o código

add default call iOS action if phone number was tapped

cyberta %!s(int64=4) %!d(string=hai) anos
pai
achega
b84e6ebab4
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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)")
     }