From b528038c2bb50e7cc540f1b7980171b6386da17f Mon Sep 17 00:00:00 2001 From: lxm <1274844347@qq.com> Date: Sat, 20 Sep 2025 20:08:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(bluetooth=5Fmanager):=20=E5=9C=A8=E9=85=8D?= =?UTF-8?q?=E5=AF=B9=E9=A1=B5=E9=9D=A2=E6=97=B6=E4=B8=8D=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E8=87=B3=E9=85=8D=E5=AF=B9=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加对当前路由是否为配对页面的检查,防止在已处于配对页面时重复跳转 --- lib/data/services/bluetooth_manager.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/data/services/bluetooth_manager.dart b/lib/data/services/bluetooth_manager.dart index 08fff314c..ee28c94fa 100644 --- a/lib/data/services/bluetooth_manager.dart +++ b/lib/data/services/bluetooth_manager.dart @@ -76,7 +76,9 @@ class BluetoothManager extends GetxService { currentDeviceRx.value = newDevice; // 检查当前是否在OTA升级界面,如果是则不跳转 - if (!_isInOtaUpgradePage() && !_bleManager.isConnected) { + if (!_isInOtaUpgradePage() && + !_bleManager.isConnected && + Get.currentRoute != Routes.pairing) { Get.toNamed(Routes.pairing, arguments: newDevice); } else { Logger.info('当前在OTA升级界面,跳过配对页面跳转');