Explorar el Código

Merge pull request #1174 from deltachat/register_for_push_notifications

handle register for notifications after scan to create account
cyBerta hace 4 años
padre
commit
c61639b2ff
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      deltachat-ios/Controller/WelcomeViewController.swift

+ 4 - 0
deltachat-ios/Controller/WelcomeViewController.swift

@@ -123,6 +123,10 @@ class WelcomeViewController: UIViewController, ProgressAlertHandler {
     }
 
     private func handleLoginSuccess() {
+        let appDelegate = UIApplication.shared.delegate as! AppDelegate
+        if !UserDefaults.standard.bool(forKey: "notifications_disabled") {
+            appDelegate.registerForNotifications()
+        }
         onProgressSuccess?()
     }