waqas
01/23/2018, 3:13 PMNow:
when {
!beaconsSeen.contains(scannedBeacon) -> {
beaconsSeen.add(scannedBeacon)
assetRepository.findIdByUuid(scannedBeacon.uuid)?.let {
logger.debug(tag, "sending asset beacon enter for $scannedBeacon")
<http://bus.post|bus.post>(
AssetEvent.AssetBeaconEnter(
AssetBeacon(
it,
scannedBeacon.uuid,
scannedBeacon.major,
scannedBeacon.minor
)
)
)
}
}
}
Before:
when {
!beaconsSeen.contains(scannedBeacon) -> {
beaconsSeen.add(scannedBeacon)
assetRepository.findIdByUuid(scannedBeacon.uuid)?.let {
logger.debug(tag, "sending asset beacon enter for $scannedBeacon")
<http://bus.post|bus.post>(AssetEvent.AssetBeaconEnter(AssetBeacon(it, scannedBeacon.uuid, scannedBeacon.major, scannedBeacon.minor)))
}
}
}
I really like the before version instead. Any idea why kotlin style guide is putting too many line breaks around ()?