mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-25 15:08:12 +08:00
Add missing loading state
This commit is contained in:
parent
ae4ae4111d
commit
bcbc6c0f7c
@ -19,6 +19,7 @@ package im.vector.app.features.createdirect
|
|||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import com.airbnb.mvrx.ActivityViewModelContext
|
import com.airbnb.mvrx.ActivityViewModelContext
|
||||||
import com.airbnb.mvrx.FragmentViewModelContext
|
import com.airbnb.mvrx.FragmentViewModelContext
|
||||||
|
import com.airbnb.mvrx.Loading
|
||||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||||
import com.airbnb.mvrx.Success
|
import com.airbnb.mvrx.Success
|
||||||
import com.airbnb.mvrx.ViewModelContext
|
import com.airbnb.mvrx.ViewModelContext
|
||||||
@ -82,6 +83,8 @@ class CreateDirectRoomViewModel @AssistedInject constructor(@Assisted
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun createRoomAndInviteSelectedUsers(selections: Set<PendingSelection>) {
|
private fun createRoomAndInviteSelectedUsers(selections: Set<PendingSelection>) {
|
||||||
|
setState { copy(createAndInviteState = Loading()) }
|
||||||
|
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
val adminE2EByDefault = rawService.getElementWellknown(session.myUserId)
|
val adminE2EByDefault = rawService.getElementWellknown(session.myUserId)
|
||||||
?.isE2EByDefault()
|
?.isE2EByDefault()
|
||||||
|
Loading…
Reference in New Issue
Block a user