diff --git a/app/src/main/java/com/geeksville/mesh/repository/bluetooth/BluetoothRepository.kt b/app/src/main/java/com/geeksville/mesh/repository/bluetooth/BluetoothRepository.kt index 7cfbfa0c8..1ab08434e 100644 --- a/app/src/main/java/com/geeksville/mesh/repository/bluetooth/BluetoothRepository.kt +++ b/app/src/main/java/com/geeksville/mesh/repository/bluetooth/BluetoothRepository.kt @@ -93,7 +93,7 @@ class BluetoothRepository @Inject constructor( return flow> { val devices = adapter.bondedDevices ?: emptySet() while (true) { - emit(devices.filter { it.name != null && it.name.matches(Regex(BLE_NAME_PATTERN)) }) + emit(devices.filter { it.name?.matches(Regex(BLE_NAME_PATTERN)) == true }) delay(REFRESH_DELAY_MS) } }.flowOn(dispatchers.default).distinctUntilChanged()