ar-g
07/02/2018, 1:53 PMprivate fun processSelectedImages(selectedImages: LinkedHashMap<String, Image>) {
assertMainThread()
fun fillAdIds(
index: Int,
map: LinkedHashMap<String, Image>
) = map.values.map { image -> image.copy(adId = tempAdIds[index]!!) }
val imagesWithAdId = listsOfImages
.mapIndexed(::fillAdIds)
.flatMap { it }
.map { it.copy() }
NPE happens in internal function fillAdIds
Lucas Ł
07/02/2018, 1:57 PMar-g
07/02/2018, 2:00 PM