Guest User

Untitled

a guest
Mar 20th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.42 KB | None | 0 0
  1. override fun mapCarModelNames(wish: List<GetWishResponse>):
  2.             Flowable<List<GetWishResponse>> =
  3.         database.carModelsDao().getAllCarModels.map { models ->
  4.             wish.forEach { it ->
  5.                 val matchingCar = models.find { model ->
  6.                     it.model_id == model.id
  7.                 }
  8.  
  9.                 it.model_name = matchingCar?.name
  10.             }
  11.  
  12.             wish
  13.         }
Advertisement
Add Comment
Please, Sign In to add comment