-
-
Save EugeneShapovalov94/09323b68b2537a9d23a9200292b015c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addViewDisposable(onIHaveArrivedClicked()) | |
private fun onIHaveArrivedClicked(): Disposable { | |
return interactor.getAssessmentClaim(view.getAssessmentId()) | |
.firstOrError() | |
.flatMap { assessment -> | |
interactor.updateSurveyor(assessment.id, assessment.surveyor.copy(arrivedAt = Instant.now())) | |
} | |
.subscribeOn(schedulerProvider.io()) | |
.observeOn(schedulerProvider.ui()) | |
.subscribe({ assessment -> | |
navigator.navigateToAssessmentHome(assessment.id) | |
}, { | |
Timber.w(it) { "Error onIHaveArrivedClicked." } | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment