瀏覽代碼

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

use dcContext.lastErrorString instead of AppDelegate.lastErrorString
nayooti 5 年之前
父節點
當前提交
32ebada9e3
共有 2 個文件被更改,包括 2 次插入3 次删除
  1. 0 1
      deltachat-ios/AppDelegate.swift
  2. 2 2
      deltachat-ios/Controller/QrViewController.swift

+ 0 - 1
deltachat-ios/AppDelegate.swift

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

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

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