mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
Add loading state
This commit is contained in:
parent
a695a8448d
commit
c7989f04ce
@ -63,6 +63,9 @@ class ConversationsListViewModel constructor(
|
||||
val searchQuery = MutableLiveData<String>()
|
||||
val currentUserLiveData: LiveData<UserNgEntity> = usersRepository.getActiveUserLiveData()
|
||||
val conversationsLiveData = Transformations.switchMap(currentUserLiveData) {
|
||||
if (viewState.value != LOADING) {
|
||||
viewState.value = LOADING
|
||||
}
|
||||
conversationsRepository.getConversationsForUser(it.id!!)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user