Se7eN
09/17/2020, 6:56 PMusers.postValue(repository.getUsers(20))
, the getUsers function executes but the value isn't posted but when I do list = repository.getUsers(20)
and then do users.postValue(list)
it works totally fine. What's the deal here?users
livedata in the first case. Also, I'm using viewModelScope.launch
, if it mattersIan Lake
09/17/2020, 7:07 PMrepository.getUsers()
should just return a LiveData
?Se7eN
09/17/2020, 7:10 PMLiveData
in my repository so I'm using the liveData
builder nowIan Lake
09/17/2020, 8:24 PMFlow
the entire way up, then use asLiveData()
to convert it over in your ViewModelSe7eN
09/18/2020, 9:04 AM