Fixed video & preview being visible while call is locally paused
This commit is contained in:
parent
4fd7246a74
commit
cb34e761c6
2 changed files with 5 additions and 3 deletions
|
@ -254,8 +254,9 @@ class CallsViewModel : ViewModel() {
|
|||
private fun updateCurrentCallData(currentCall: Call?) {
|
||||
var callToUse = currentCall
|
||||
if (currentCall == null) {
|
||||
Log.w("[Calls] Current call is now null")
|
||||
if (coreContext.core.callsNb == 1) return // There is only one call, most likely it is paused
|
||||
|
||||
Log.w("[Calls] Current call is now null")
|
||||
val firstCall = coreContext.core.calls.find { call ->
|
||||
call.state != Call.State.Error && call.state != Call.State.End && call.state != Call.State.Released
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
type="org.linphone.activities.voip.viewmodels.StatisticsListViewModel" />
|
||||
</data>
|
||||
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/coordinator"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -166,7 +167,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:onClick="@{() -> controlsViewModel.toggleFullScreen()}"
|
||||
android:visibility="@{controlsViewModel.isVideoEnabled && controlsViewModel.isSendingVideo && !callsViewModel.currentCallData.isRemotelyPaused ? View.VISIBLE : View.GONE, default=gone}"
|
||||
android:visibility="@{controlsViewModel.isVideoEnabled && controlsViewModel.isSendingVideo && !callsViewModel.currentCallData.isRemotelyPaused && !callsViewModel.currentCallData.isPaused ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:layout_constraintBottom_toBottomOf="@id/background"
|
||||
app:layout_constraintEnd_toEndOf="@id/background"
|
||||
app:layout_constraintStart_toStartOf="@id/background"
|
||||
|
@ -222,7 +223,7 @@
|
|||
android:id="@+id/video_preview_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="@{controlsViewModel.isVideoEnabled && !callsViewModel.currentCallData.isRemotelyPaused ? View.VISIBLE : View.GONE}"
|
||||
android:visibility="@{controlsViewModel.isVideoEnabled && !callsViewModel.currentCallData.isRemotelyPaused && !callsViewModel.currentCallData.isPaused ? View.VISIBLE : View.GONE}"
|
||||
app:constraint_referenced_ids="local_preview_video_surface,switch_camera" />
|
||||
|
||||
<org.linphone.activities.voip.views.RoundCornersTextureView
|
||||
|
|
Loading…
Reference in a new issue