Skip to content

Commit 0e5607d

Browse files
committed
fix: actually fix kotlin error
1 parent 65c57f3 commit 0e5607d

File tree

1 file changed

+1
-3
lines changed
  • packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble

1 file changed

+1
-3
lines changed

packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/PluginController.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,7 @@ class PluginController {
272272
private fun getConnectedDevices(call: MethodCall, result: Result) {
273273
val devices = bleClient.getConnectedDevices().map{ protoConverter.convertToDeviceInfo(it) }
274274
val message = pb.DeviceInfoCollection.newBuilder()
275-
if (devices.isNotEmpty()) {
276-
devices.forEachIndexed { index, device -> message.setDevices(index, device)}
277-
}
275+
devices.forEach { device -> message.addDevices(device)}
278276
result.success(message.build().toByteArray())
279277
}
280278
}

0 commit comments

Comments
 (0)