소스 검색

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)