Browse Source

Merge pull request #1174 from deltachat/register_for_push_notifications

handle register for notifications after scan to create account
cyBerta 4 years ago
parent
commit
c61639b2ff
1 changed files with 4 additions and 0 deletions
  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() {
     private func handleLoginSuccess() {
+        let appDelegate = UIApplication.shared.delegate as! AppDelegate
+        if !UserDefaults.standard.bool(forKey: "notifications_disabled") {
+            appDelegate.registerForNotifications()
+        }
         onProgressSuccess?()
         onProgressSuccess?()
     }
     }