Browse Source

Merge pull request #1174 from deltachat/register_for_push_notifications

handle register for notifications after scan to create account
cyBerta 4 năm trước cách đây
mục cha
commit
c61639b2ff
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  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?()
     }