From 948b44e913aaad23339d88235a494f04c82014b7 Mon Sep 17 00:00:00 2001 From: zeng Date: Sat, 7 Jun 2025 11:35:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MoviaBox/AppDelegate/SceneDelegate.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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() + } } } }