fix:bug解决

This commit is contained in:
李伊帆
2026-10-28 10:36:39 +08:00
parent c369127166
commit 91bca314ba
57 changed files with 2839 additions and 384 deletions

View File

@@ -153,7 +153,12 @@ export function useDeviceBluetoothSync(context: DeviceBluetoothSyncContext) {
if (!foundDevice) {
setSyncText('未找到设备,请确认已开机并靠近手机')
if (!tearingDown) {
reportBleLinkLostLocal()
if (hadSuccessfulSync) {
hadSuccessfulSync = false
void reportBleDisconnected()
} else {
reportBleLinkLostLocal()
}
}
return false
}
@@ -184,7 +189,12 @@ export function useDeviceBluetoothSync(context: DeviceBluetoothSyncContext) {
if (!tearingDown) {
bleDeviceId.value = undefined
clearZ2BleHandleCache(targetBleId)
reportBleLinkLostLocal()
if (hadSuccessfulSync) {
hadSuccessfulSync = false
void reportBleDisconnected()
} else {
reportBleLinkLostLocal()
}
}
return false
} finally {