diff --git a/MoviaBox/AppDelegate/SceneDelegate.swift b/MoviaBox/AppDelegate/SceneDelegate.swift index bbc987f..cbed52d 100644 --- a/MoviaBox/AppDelegate/SceneDelegate.swift +++ b/MoviaBox/AppDelegate/SceneDelegate.swift @@ -45,6 +45,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. handleOpenAppMessage(webpageURL: nil) SPStatAPI.requestEnterApp() + handleOnLine() } func sceneWillResignActive(_ scene: UIScene) { @@ -148,9 +149,13 @@ extension SceneDelegate { @objc private func reachabilityDidChangeNotification() { let localizedData = SPLocalizedManager.shared.localizedData ?? [:] - if SPNetworkReachabilityManager.manager.isReachable == true && localizedData.isEmpty { + if SPNetworkReachabilityManager.manager.isReachable == true { + handleOnLine() + ///缺少语言数据,重新获取语言数据 - self.startApp() + if localizedData.isEmpty { + self.startApp() + } } } }