Created
July 19, 2016 12:42
-
-
Save Ulop/09c9c31d3780e1d4bb68763f1d321df2 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
restApi.getDocumentList() | |
.subscribeOn(Schedulers.io()) | |
.observeOn(AndroidSchedulers.mainThread()) | |
.map { response -> | |
response.forEach { list -> | |
list.DocList.forEach { document -> | |
document.FieldsValues?.fields?.forEach { field -> | |
val data = list.Fields.find { it.Code == field.Code }!! | |
field.Name = data.Name | |
field.Order = data.Order | |
field.Show = data.Show | |
field.ShowInPreview = data.ShowInPreview | |
field.PreviewOrder = data.PreviewOrder | |
} | |
} | |
} | |
response | |
} | |
.subscribe( | |
{ | |
i { it.size.toString() } | |
}, | |
{ | |
throw it | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment