diff --git a/lib/data/services/novice_guide_service.dart b/lib/data/services/novice_guide_service.dart index 17d9f0a35..f7617114f 100644 --- a/lib/data/services/novice_guide_service.dart +++ b/lib/data/services/novice_guide_service.dart @@ -14,7 +14,7 @@ class NoviceGuideService extends GetxService { final BleService _bleService = BleService(); StreamSubscription? _statusSubscription; - bool isHomeGuide = false; + bool isHomeGuide = false; //false代表未完成新手引导,true代表已经完成 bool isAIGuide = false; RxBool isWakeup = false.obs; diff --git a/lib/modules/home/controllers/home_controller.dart b/lib/modules/home/controllers/home_controller.dart index 518726b18..a031c0b97 100644 --- a/lib/modules/home/controllers/home_controller.dart +++ b/lib/modules/home/controllers/home_controller.dart @@ -177,7 +177,7 @@ class HomeController extends GetxController { bool wasConnected = _isFullyConnected.value; bool isNowConnected = hasClassicBluetooth && hasBleConnection; - bool isGuideCompleted = _storage.read('home_guide') ?? false; + //bool isGuideCompleted = _storage.read('home_guide') ?? false; if (isNowConnected && currentDevice == null) { isNowConnected = false; @@ -197,7 +197,7 @@ class HomeController extends GetxController { // 移除了连接成功后的电池信息刷新 // 连接成功后检查OTA升级 - if (isGuideCompleted) { + if (noviceGuideService.isHomeGuide) { Future.delayed(const Duration(seconds: 2), () { _checkOtaUpgrade(); }); @@ -338,7 +338,7 @@ class HomeController extends GetxController { if (deviceName == 'unknownEquipment'.tr) { return DeviceType.unknown; } - + // 通过AppConfig获取产品信息 final product = AppConfig.getproduct(deviceName); if (product != null) { @@ -358,7 +358,7 @@ class HomeController extends GetxController { return DeviceType.unknown; } } - + return DeviceType.unknown; } catch (e) { Logger.e(_tag, '获取设备类型失败: $e');