Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private fun getRecommendedContacts() {
- interactor?.let { interactor ->
- compositeDisposable?.add(
- interactor.getRecommendedContacts()
- .map { recommendedContacts ->
- recommendedContacts.map { recommendedContact ->
- Pair(
- interactor.getContactById(recommendedContact.contactId).blockingGet(),
- recommendedContact
- )
- }.filter { !it.first.isBlocked }.associateBy { it.first.id }
- }.compose(ioToMainSingleScheduler())
- .doOnSuccess { recommendedContactsMap ->
- this.recommendedContactsMap = recommendedContactsMap.toMutableMap()
- view?.displayRecommendedContacts(recommendedContactsMap.map { it.value.first })
- }.subscribe())
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement