mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Use observeViewEvents
facility
This commit is contained in:
parent
099d0ca564
commit
8421d46cd7
1 changed files with 3 additions and 9 deletions
|
@ -35,7 +35,6 @@ import androidx.core.content.ContextCompat
|
|||
import androidx.core.content.getSystemService
|
||||
import androidx.core.view.isInvisible
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.airbnb.mvrx.Fail
|
||||
import com.airbnb.mvrx.Mavericks
|
||||
import com.airbnb.mvrx.viewModel
|
||||
|
@ -62,8 +61,6 @@ import im.vector.app.features.home.room.detail.RoomDetailActivity
|
|||
import im.vector.app.features.home.room.detail.RoomDetailArgs
|
||||
import io.github.hyuwah.draggableviewlib.DraggableView
|
||||
import io.github.hyuwah.draggableviewlib.setupDraggable
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import org.matrix.android.sdk.api.extensions.orFalse
|
||||
import org.matrix.android.sdk.api.logger.LoggerTag
|
||||
|
@ -142,12 +139,9 @@ class VectorCallActivity : VectorBaseActivity<ActivityCallBinding>(), CallContro
|
|||
}
|
||||
}
|
||||
|
||||
callViewModel.viewEvents
|
||||
.stream()
|
||||
.onEach {
|
||||
callViewModel.observeViewEvents {
|
||||
handleViewEvents(it)
|
||||
}
|
||||
.launchIn(lifecycleScope)
|
||||
|
||||
callViewModel.onEach(VectorCallViewState::callId, VectorCallViewState::isVideoCall) { _, isVideoCall ->
|
||||
if (isVideoCall) {
|
||||
|
|
Loading…
Reference in a new issue