Преглед изворни кода

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

Revert "call maybeNetwork() unconditionally on coming to foreground; "
cyBerta пре 5 година
родитељ
комит
564d63d315
1 измењених фајлова са 3 додато и 1 уклоњено
  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)