Selaa lähdekoodia

Revert "call maybeNetwork() unconditionally on coming to foreground; "

bjoern 5 vuotta sitten
vanhempi
commit
7f4f46754f
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  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)