Explorar o código

Merge pull request #786 from deltachat/revert-784-maybe-network-on-fg

Revert "call maybeNetwork() unconditionally on coming to foreground; "
cyBerta %!s(int64=5) %!d(string=hai) anos
pai
achega
564d63d315
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      deltachat-ios/AppDelegate.swift

+ 3 - 1
deltachat-ios/AppDelegate.swift

@@ -103,7 +103,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         logger.info("---- foreground ----")
         appIsInForeground = true
         startThreads()
-        self.dcContext.maybeNetwork()
+        if reachability.connection != .none {
+            self.dcContext.maybeNetwork()
+        }
 
         if let userDefaults = UserDefaults.shared, userDefaults.bool(forKey: UserDefaults.hasExtensionAttemptedToSend) {
             userDefaults.removeObject(forKey: UserDefaults.hasExtensionAttemptedToSend)