Эх сурвалжийг харах

Merge pull request #636 from deltachat/fix-last-error-string

use dcContext.lastErrorString instead of AppDelegate.lastErrorString
nayooti 5 жил өмнө
parent
commit
32ebada9e3

+ 0 - 1
deltachat-ios/AppDelegate.swift

@@ -22,7 +22,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
     var locationManager: LocationManager!
     var locationManager: LocationManager!
     // static let appCoordinatorDeprecated = AppCoordinatorDeprecated()
     // static let appCoordinatorDeprecated = AppCoordinatorDeprecated()
     static var progress: Float = 0 // TODO: delete
     static var progress: Float = 0 // TODO: delete
-    static var lastErrorString: String?
     private var backgroundTask: UIBackgroundTaskIdentifier = .invalid
     private var backgroundTask: UIBackgroundTaskIdentifier = .invalid
 
 
     var reachability = Reachability()!
     var reachability = Reachability()!

+ 2 - 2
deltachat-ios/Controller/QrViewController.swift

@@ -141,9 +141,9 @@ class QrViewController: UITableViewController {
             // execute blocking secure join in background
             // execute blocking secure join in background
             DispatchQueue.global(qos: .background).async {
             DispatchQueue.global(qos: .background).async {
                 self.addSecureJoinProgressListener()
                 self.addSecureJoinProgressListener()
-                AppDelegate.lastErrorString = nil
+                self.dcContext.lastErrorString = nil
                 let chatId = self.dcContext.joinSecurejoin(qrCode: code)
                 let chatId = self.dcContext.joinSecurejoin(qrCode: code)
-                let errorString = AppDelegate.lastErrorString
+                let errorString = self.dcContext.lastErrorString
                 self.removeSecureJoinProgressListener()
                 self.removeSecureJoinProgressListener()
 
 
                 DispatchQueue.main.async {
                 DispatchQueue.main.async {