Explorar o código

handle register for notifications after scan to create account

cyberta %!s(int64=4) %!d(string=hai) anos
pai
achega
4d49edf82e
Modificáronse 1 ficheiros con 4 adicións e 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?()
     }