Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
return object: LiveData<MainViewState>(){
override fun onActive() {
super.onActive()
val blogList: ArrayList<BlogPost> = ArrayList()
blogList.add(
BlogPost(
pk = 0,
title = "Vancouver PNE 2019",
body = "Here is Jess and I at the Vancouver PNE. We ate a lot of food.",
image = "https://cdn.open-api.xyz/open-api-static/static-blog-images/image8.jpg"
)
)
blogList.add(
BlogPost(
pk = 1,
title = "Ready for a Walk",
body = "Here I am at the park with my dogs Kiba and Maizy. Maizy is the smaller one and Kiba is the larger one.",
image = "https://cdn.open-api.xyz/open-api-static/static-blog-images/image2.jpg"
)
)
value = MainViewState(
blogPosts = blogList
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.