From bfd00f3d0938d169d16b2b91efe66bb539ab1bf4 Mon Sep 17 00:00:00 2001 From: Dominik Czupryna Date: Mon, 16 Oct 2023 14:06:19 +0200 Subject: [PATCH] fix: android legacy scan linter errors --- .../src/screens/MainStack/DashboardScreen/DashboardScreen.tsx | 4 ++-- example/src/services/BLEService/BLEService.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/src/screens/MainStack/DashboardScreen/DashboardScreen.tsx b/example/src/screens/MainStack/DashboardScreen/DashboardScreen.tsx index 53e8e879..4f898401 100644 --- a/example/src/screens/MainStack/DashboardScreen/DashboardScreen.tsx +++ b/example/src/screens/MainStack/DashboardScreen/DashboardScreen.tsx @@ -77,14 +77,14 @@ export function DashboardScreen({ navigation }: DashboardScreenProps) { label="Look for devices" onPress={() => { setFoundDevices([]) - BLEService.initializeBLE().then(() => BLEService.scanDevices(true, addFoundDevice)) + BLEService.initializeBLE().then(() => BLEService.scanDevices(addFoundDevice, null, true)) }} /> { setFoundDevices([]) - BLEService.initializeBLE().then(() => BLEService.scanDevices(false, addFoundDevice)) + BLEService.initializeBLE().then(() => BLEService.scanDevices(addFoundDevice, null, false)) }} /> diff --git a/example/src/services/BLEService/BLEService.ts b/example/src/services/BLEService/BLEService.ts index 66fa347c..3eba303b 100644 --- a/example/src/services/BLEService/BLEService.ts +++ b/example/src/services/BLEService/BLEService.ts @@ -81,7 +81,7 @@ class BLEServiceInstance { this.showErrorToast('Bluetooth is turned off') } - scanDevices = async (legacyScan: boolean, onDeviceFound: (device: Device) => void, UUIDs: UUID[] | null = null) => { + scanDevices = async (onDeviceFound: (device: Device) => void, UUIDs: UUID[] | null = null, legacyScan?: boolean) => { this.manager.startDeviceScan(UUIDs, { legacyScan }, (error, device) => { if (error) { this.onError(error)