diff --git a/app/src/main/java/org/linphone/activities/main/conference/data/ConferenceSchedulingParticipantData.kt b/app/src/main/java/org/linphone/activities/main/conference/data/ConferenceSchedulingParticipantData.kt index 71d9f0f87..c49947b2d 100644 --- a/app/src/main/java/org/linphone/activities/main/conference/data/ConferenceSchedulingParticipantData.kt +++ b/app/src/main/java/org/linphone/activities/main/conference/data/ConferenceSchedulingParticipantData.kt @@ -25,7 +25,8 @@ import org.linphone.utils.LinphoneUtils class ConferenceSchedulingParticipantData( private val sipAddress: Address, - val showLimeBadge: Boolean + val showLimeBadge: Boolean = false, + val showDivider: Boolean = true ) : GenericContactData(sipAddress) { val sipUri: String get() = LinphoneUtils.getDisplayableAddress(sipAddress) diff --git a/app/src/main/java/org/linphone/activities/main/history/viewmodels/CallLogViewModel.kt b/app/src/main/java/org/linphone/activities/main/history/viewmodels/CallLogViewModel.kt index d87a50151..86aba726e 100644 --- a/app/src/main/java/org/linphone/activities/main/history/viewmodels/CallLogViewModel.kt +++ b/app/src/main/java/org/linphone/activities/main/history/viewmodels/CallLogViewModel.kt @@ -116,6 +116,7 @@ class CallLogViewModel(val callLog: CallLog, private val isRelated: Boolean = fa val conferenceSubject = callLog.conferenceInfo?.subject val conferenceParticipantsData = MutableLiveData>() + val organizerParticipantData = MutableLiveData() val conferenceTime = MutableLiveData() val conferenceDate = MutableLiveData() @@ -152,9 +153,14 @@ class CallLogViewModel(val callLog: CallLog, private val isRelated: Boolean = fa hideYear = false ) } + val organizer = conferenceInfo.organizer + if (organizer != null) { + organizerParticipantData.value = + ConferenceSchedulingParticipantData(organizer, showLimeBadge = false, showDivider = false) + } val list = arrayListOf() for (participant in conferenceInfo.participants) { - list.add(ConferenceSchedulingParticipantData(participant, false)) + list.add(ConferenceSchedulingParticipantData(participant, showLimeBadge = false, showDivider = true)) } conferenceParticipantsData.value = list } @@ -169,6 +175,7 @@ class CallLogViewModel(val callLog: CallLog, private val isRelated: Boolean = fa fun destroy() { if (!isRelated) { relatedCallLogs.value.orEmpty().forEach(CallLogViewModel::destroy) + organizerParticipantData.value?.destroy() conferenceParticipantsData.value.orEmpty() .forEach(ConferenceSchedulingParticipantData::destroy) } diff --git a/app/src/main/java/org/linphone/activities/voip/data/ConferenceParticipantDeviceData.kt b/app/src/main/java/org/linphone/activities/voip/data/ConferenceParticipantDeviceData.kt index 2c61e87fd..ffc0eb39f 100644 --- a/app/src/main/java/org/linphone/activities/voip/data/ConferenceParticipantDeviceData.kt +++ b/app/src/main/java/org/linphone/activities/voip/data/ConferenceParticipantDeviceData.kt @@ -107,6 +107,7 @@ class ConferenceParticipantDeviceData( activeSpeaker.value = false micMuted.value = participantDevice.isMuted + videoAvailable.value = participantDevice.getStreamAvailability(StreamType.Video) val videoCapability = participantDevice.getStreamCapability(StreamType.Video) videoSendReceive.value = videoCapability == MediaDirection.SendRecv @@ -120,7 +121,7 @@ class ConferenceParticipantDeviceData( videoEnabled.value = isVideoAvailableAndSendReceive() } - Log.i("[Conference Participant Device] Participant [${participantDevice.address.asStringUriOnly()}], is in conf? ${isInConference.value}, is video available? ${videoAvailable.value} ($videoCapability)") + Log.i("[Conference Participant Device] Participant [${participantDevice.address.asStringUriOnly()}], is in conf? ${isInConference.value}, is video available? ${videoAvailable.value} ($videoCapability), is mic muted? ${micMuted.value}") } override fun destroy() { diff --git a/app/src/main/res/layout/conference_scheduling_participant_cell.xml b/app/src/main/res/layout/conference_scheduling_participant_cell.xml index 38fc01fb2..d2cdf2728 100644 --- a/app/src/main/res/layout/conference_scheduling_participant_cell.xml +++ b/app/src/main/res/layout/conference_scheduling_participant_cell.xml @@ -4,10 +4,13 @@ xmlns:tools="http://schemas.android.com/tools"> - + + + + + android:layout_marginRight="5dp" + android:orientation="horizontal"> + tools:layout="@layout/contact_avatar" /> + android:lines="1" + android:text="@{data.contact.fullName ?? data.displayName}" /> + android:lines="1" + android:text="@{data.sipUri}" /> @@ -61,8 +64,9 @@ + android:visibility="@{data.showDivider ? View.VISIBLE : View.GONE}" /> diff --git a/app/src/main/res/layout/history_conf_detail_fragment.xml b/app/src/main/res/layout/history_conf_detail_fragment.xml index 06541dbbc..28eee7057 100644 --- a/app/src/main/res/layout/history_conf_detail_fragment.xml +++ b/app/src/main/res/layout/history_conf_detail_fragment.xml @@ -3,19 +3,25 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> - + + + + type="android.view.View.OnClickListener" /> + + type="android.view.View.OnClickListener" /> + + type="android.view.View.OnClickListener" /> + + @@ -35,23 +41,23 @@ + android:src="@drawable/back" + android:visibility="@{sharedMainViewModel.isSlidingPaneSlideable ? View.VISIBLE : View.GONE}" /> + android:text="@{viewModel.conferenceSubject, default=`Conference subject`}" /> @@ -66,30 +72,30 @@ + android:layout_marginEnd="10dp" + android:orientation="horizontal"> + android:text="@string/conference_schedule_date" /> @@ -97,23 +103,23 @@ + android:text="@string/conference_schedule_time" /> @@ -127,12 +133,31 @@ android:background="?attr/voipFormBackgroundColor"> + + + + + + + + + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="20dp" + android:padding="5dp" + android:text="@string/conference_schedule_participants_list" /> @@ -151,19 +176,19 @@ + android:visibility="gone" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cc205d0ac..994157eb5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -252,6 +252,7 @@ Would you like to encrypt the conference? Invite will be sent out from my &appName; account Participants list + Organizer Conference info Create conference Schedule conference