From 4dac62e731ee638607bd7ec8dba3565b92206ac4 Mon Sep 17 00:00:00 2001 From: reasje Date: Mon, 29 Jul 2024 17:28:19 +0330 Subject: [PATCH] fix: Integrate connection handler with blueberry use case --- .../blueberry_ring/domain/blueberry_ring_use_case.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/features/common/packages/bluetooth/blueberry_ring/domain/blueberry_ring_use_case.dart b/lib/features/common/packages/bluetooth/blueberry_ring/domain/blueberry_ring_use_case.dart index f2c8f780..09cd25aa 100644 --- a/lib/features/common/packages/bluetooth/blueberry_ring/domain/blueberry_ring_use_case.dart +++ b/lib/features/common/packages/bluetooth/blueberry_ring/domain/blueberry_ring_use_case.dart @@ -101,7 +101,7 @@ class BlueberryRingUseCase extends ReactiveUseCase { } Future connectToBlueberryRing() async { - await selectedBlueberryRing.value!.device.connect(); + await _bluetoothUseCase.connectionHandler(selectedBlueberryRing.value!.device); } Future getBlueberryRingBluetoothService() async { @@ -126,7 +126,7 @@ class BlueberryRingUseCase extends ReactiveUseCase { 'checkEstablishment:isBlueberryRingConnected $isBlueberryRingConnected'); if (!isBlueberryRingConnected) { - await selectedBlueberryRing.value?.device.connect(); + await _bluetoothUseCase.connectionHandler(selectedBlueberryRing.value!.device); isBlueberryRingConnected = selectedBlueberryRing.value?.device.isConnected ?? false; if (!isBlueberryRingConnected) {