소스 검색

call maybeNetwork() unconditionally on coming to foreground; the call is required when there is some network, so, it is called in the majority of cases anyway. skipping the check removes uncertainity in checking the network state.

B. Petersen 5 년 전
부모
커밋
ca784c0929
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      deltachat-ios/AppDelegate.swift

+ 1 - 3
deltachat-ios/AppDelegate.swift

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