mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Wraps Alert strings in NSLocalizedString
Also removes `tel` scheme handling.
This commit is contained in:
@@ -15,8 +15,4 @@ extension URL {
|
||||
scheme == "mailto" ? URLComponents(url: self, resolvingAgainstBaseURL: false)?.path : nil
|
||||
}
|
||||
|
||||
/// Extracts telephone number from a `URL` with a `tel` scheme, otherwise `nil`.
|
||||
var telNumber: String? {
|
||||
scheme == "tel" ? URLComponents(url: self, resolvingAgainstBaseURL: false)?.path : nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -324,8 +324,8 @@ extension WebViewController: WKNavigationDelegate {
|
||||
mailComposeViewController.mailComposeDelegate = self
|
||||
self.present(mailComposeViewController, animated: true, completion: {})
|
||||
} else {
|
||||
let alert = UIAlertController(title: "Error", message: "This device cannot send emails.", preferredStyle: .alert)
|
||||
alert.addAction(.init(title: "Dismiss", style: .cancel, handler: nil))
|
||||
let alert = UIAlertController(title: NSLocalizedString("Error", comment: "Error"), message: NSLocalizedString("This device cannot send emails.", comment: "This device cannot send emails."), preferredStyle: .alert)
|
||||
alert.addAction(.init(title: NSLocalizedString("Dismiss", comment: "Dismiss"), style: .cancel, handler: nil))
|
||||
self.present(alert, animated: true, completion: nil)
|
||||
}
|
||||
} else if components?.scheme == "tel" {
|
||||
|
||||
Reference in New Issue
Block a user