Эх сурвалжийг харах

add default call iOS action if phone number was tapped

cyberta 4 жил өмнө
parent
commit
b84e6ebab4

+ 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)")
     }