Commit 4b04ba2

derdilla <82763757+NobodyForNothing@users.noreply.github.com>
2024-06-18 12:27:37
fix first exception
Signed-off-by: derdilla <82763757+NobodyForNothing@users.noreply.github.com>
1 parent 599e91a
Changed files (1)
app
app/lib/bluetooth/device_scan_cubit.dart
@@ -72,7 +72,7 @@ class DeviceScanCubit extends Cubit<DeviceScanState> {
   void _onScanResult(List<ScanResult> devices) {
     Log.trace('_onScanResult devices: $devices');
 
-    assert(_flutterBluePlus.isScanningNow);
+    assert(devices.isEmpty || _flutterBluePlus.isScanningNow);
     // No need to check whether the devices really support the searched
     // characteristic as users have to select their device anyways.
     if(state is DeviceSelected) return;