|
@@ -822,6 +822,26 @@ public class Nexilis: NSObject {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ static func openmailAction() {
|
|
|
+ if let googleUrl = NSURL(string: "googlegmail://"), UIApplication.shared.canOpenURL(googleUrl as URL) {
|
|
|
+ openMail(googleUrl)
|
|
|
+ } else if let mailURL = NSURL(string: "message://"), UIApplication.shared.canOpenURL(mailURL as URL) {
|
|
|
+ openMail(mailURL)
|
|
|
+ } else if let outlookURL = NSURL(string: "ms-outlook://"), UIApplication.shared.canOpenURL(outlookURL as URL) {
|
|
|
+ openMail(outlookURL)
|
|
|
+ } else if let yahooURL = NSURL(string: "ymail://"), UIApplication.shared.canOpenURL(yahooURL as URL) {
|
|
|
+ openMail(yahooURL)
|
|
|
+ } else if let sparkUrl = NSURL(string: "readdle-spark://"), UIApplication.shared.canOpenURL(sparkUrl as URL) {
|
|
|
+ openMail(sparkUrl)
|
|
|
+ } else {
|
|
|
+ // showAlert
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private static func openMail(_ url: NSURL) {
|
|
|
+ UIApplication.shared.open(url as URL, options: [:], completionHandler: nil)
|
|
|
+ }
|
|
|
+
|
|
|
static var alertChangeProfile = LibAlertController()
|
|
|
public static func checkIsChangePerson() -> Bool {
|
|
|
let isChangeProfile = Utils.getSetProfile()
|