Minor improvement

This commit is contained in:
Bart Sopers 2021-02-27 23:46:57 +01:00
parent d08a979da3
commit 7e5667705d

View file

@ -25,11 +25,12 @@ class OmnipodDashManagerImpl @Inject constructor(
) : OmnipodDashManager {
private val observePodReadyForActivationPart1: Observable<PodEvent>
get() {
get() = Observable.defer {
if (podStateManager.activationProgress.isBefore(ActivationProgress.PHASE_1_COMPLETED)) {
return Observable.empty()
Observable.empty()
} else {
Observable.error(IllegalStateException("Pod is in an incorrect state"))
}
return Observable.error(IllegalStateException("Pod is in an incorrect state"))
}
override fun activatePodPart1(): Observable<PodEvent> {