fix:bug解决
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user