dash ble: use .let(Id::fromLong)
https://github.com/0pen-dash/AndroidAPS/pull/21#pullrequestreview-610227073
This commit is contained in:
parent
27e9b25e86
commit
0396b9ca99
|
@ -49,7 +49,7 @@ class OmnipodDashBleManagerImpl @Inject constructor(
|
|||
private var status: ConnectionStatus = ConnectionStatus.IDLE
|
||||
private val myId = Id.fromInt(CONTROLLER_ID)
|
||||
private val uniqueId = podState.uniqueId
|
||||
private val podId = uniqueId?.let { Id.fromLong(uniqueId) }
|
||||
private val podId = uniqueId?.let(Id::fromLong)
|
||||
?: myId.increment() // pod not activated
|
||||
|
||||
@Throws(
|
||||
|
|
Loading…
Reference in a new issue