Skip to content

Instantly share code, notes, and snippets.

@mrahimygk
Last active May 11, 2021 09:41
Show Gist options
  • Save mrahimygk/ed9e6fe071162888e9078cd4481b1920 to your computer and use it in GitHub Desktop.
Save mrahimygk/ed9e6fe071162888e9078cd4481b1920 to your computer and use it in GitHub Desktop.
fun map(eventData: AboutData, club: ClubSupportItem, matches: LatestMatchItem?,
subData: EventFragmentBundleCapsule?, match: Match?, news: SearchResult<SMNews>?)
news?.data?.let { newsData ->
items.add(HeaderNews(App.get().getString(R.string.mdl_st_common_news), App.get().getString(R.string.mdl_st_common_see_all_news)))
items.addAll(newsData.take(5).map { NewsItemSmall(it) }.toTypedArray())
}
return@combineWith if (event == null || club == null || capsuleData == null) null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment