Hide call encryption in call ended fragment if call wasn't answered

This commit is contained in:
Sylvain Berfini 2024-09-30 12:16:40 +02:00
parent cd8785855d
commit bb4e9fdeb5
2 changed files with 3 additions and 0 deletions

View file

@ -327,6 +327,7 @@ class CurrentCallViewModel @UiThread constructor() : GenericViewModel() {
updateVideoDirection(call.currentParams.videoDirection)
if (call.state == Call.State.Connected) {
updateCallDuration()
if (call.conference != null) {
Log.i(
"$TAG Call is in Connected state and conference isn't null, going to conference fragment"
@ -337,6 +338,7 @@ class CurrentCallViewModel @UiThread constructor() : GenericViewModel() {
conferenceModel.destroy()
}
} else if (call.state == Call.State.StreamsRunning) {
updateCallDuration()
if (corePreferences.automaticallyStartCallRecording) {
isRecording.postValue(call.params.isRecording)
}

View file

@ -64,6 +64,7 @@
android:id="@+id/call_media_encryption_info"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:visibility="@{viewModel.callDuration > 0 ? View.VISIBLE : View.GONE, default=gone}"
layout="@layout/call_media_encryption_info"
bind:viewModel="@{viewModel}"
app:layout_constraintTop_toBottomOf="@id/call_direction_label"