Browse Source

unify imex-progress callback

B. Petersen 6 years ago
parent
commit
d80123b3b7

+ 1 - 2
deltachat-ios/Controller/AccountSetupController.swift

@@ -250,7 +250,6 @@ class AccountSetupController: UITableViewController {
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
         addProgressHudEventListener()
-        // loginButton.isEnabled = false
     }
 
     override func viewWillDisappear(_ animated: Bool) {
@@ -487,7 +486,7 @@ class AccountSetupController: UITableViewController {
     private func addProgressHudEventListener() {
         let nc = NotificationCenter.default
         backupProgressObserver = nc.addObserver(
-            forName: dcNotificationBackupProgress,
+            forName: dcNotificationImexProgress,
             object: nil,
             queue: nil
         ) {

+ 1 - 1
deltachat-ios/Controller/SettingsController.swift

@@ -34,7 +34,7 @@ internal final class SettingsViewController: QuickTableViewController {
         super.viewDidAppear(animated)
         let nc = NotificationCenter.default
         backupProgressObserver = nc.addObserver(
-            forName: dcNotificationBackupProgress,
+            forName: dcNotificationImexProgress,
             object: nil,
             queue: nil
         ) { notification in

+ 2 - 2
deltachat-ios/DC/events.swift

@@ -4,7 +4,7 @@ import UserNotifications
 let dcNotificationChanged = Notification.Name(rawValue: "MrEventMsgsChanged")
 let dcNotificationStateChanged = Notification.Name(rawValue: "MrEventStateChanged")
 let dcNotificationIncoming = Notification.Name(rawValue: "MrEventIncomingMsg")
-let dcNotificationBackupProgress = Notification.Name(rawValue: "MrEventBackupProgress")
+let dcNotificationImexProgress = Notification.Name(rawValue: "dcNotificationImexProgress")
 let dcNotificationConfigureProgress = Notification.Name(rawValue: "MrEventConfigureProgress")
 let dcNotificationSecureJoinerProgress = Notification.Name(rawValue: "MrEventSecureJoinerProgress")
 let dcNotificationSecureInviterProgress = Notification.Name(rawValue: "MrEventSecureInviterProgress")
@@ -56,7 +56,7 @@ public func callbackSwift(event: CInt, data1: CUnsignedLong, data2: CUnsignedLon
         let nc = NotificationCenter.default
         DispatchQueue.main.async {
             nc.post(
-                name: dcNotificationBackupProgress,
+                name: dcNotificationImexProgress,
                 object: nil,
                 userInfo: [
                     "progress": Int(data1),