Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.26 KB | None | 0 0
  1. class FeedRepository() : BaseRepository() {
  2.  
  3.     fun loadFeeds(): LiveData<List<Feed>> {
  4.         val data = MutableLiveData<List<Feed>>()
  5.             AppExecutors.networkIO.execute {
  6.                 val feeds = RestAPI.fetchFeeds()
  7.                 data.postValue(feeds)
  8.             }
  9.         return data
  10.     }
  11.  
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement