Forráskód Böngészése

add default call iOS action if phone number was tapped

cyberta 4 éve
szülő
commit
b84e6ebab4
1 módosított fájl, 3 hozzáadás és 0 törlés
  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)")
     }