浏览代码

Merge pull request #1174 from deltachat/register_for_push_notifications

handle register for notifications after scan to create account
cyBerta 4 年之前
父节点
当前提交
c61639b2ff
共有 1 个文件被更改,包括 4 次插入0 次删除
  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?()
     }