Przeglądaj źródła

Merge pull request #1174 from deltachat/register_for_push_notifications

handle register for notifications after scan to create account
cyBerta 4 lat temu
rodzic
commit
c61639b2ff

+ 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?()
     }