Prevent blue lining & trusted badge on conference avatar

This commit is contained in:
Sylvain Berfini 2024-04-05 17:06:19 +02:00
parent 0db1754603
commit e805fbc7f3
4 changed files with 28 additions and 2 deletions

View file

@ -98,6 +98,10 @@ class CallsListFragment : GenericCallFragment() {
findNavController().popBackStack()
}
binding.setMergeCallsClickListener {
viewModel.mergeCallsIntoLocalConference()
}
viewModel.calls.observe(viewLifecycleOwner) {
Log.i("$TAG Calls list updated with [${it.size}] items")
adapter.submitList(it)

View file

@ -202,6 +202,11 @@ class CallsViewModel @UiThread constructor() : ViewModel() {
goToCallsListEvent.value = Event(true)
}
@UiThread
fun mergeCallsIntoLocalConference() {
// TODO FIXME: implement local conferences merge
}
@WorkerThread
private fun updateOtherCallsInfo() {
val core = coreContext.core

View file

@ -729,7 +729,7 @@ class CurrentCallViewModel @UiThread constructor() : ViewModel() {
)
val securityLevel = if (isDeviceTrusted) SecurityLevel.EndToEndEncryptedAndVerified else SecurityLevel.EndToEndEncrypted
val avatarModel = contact.value
if (avatarModel != null) {
if (avatarModel != null && currentCall.conference == null) { // Don't do it for conferences
avatarModel.trust.postValue(securityLevel)
contact.postValue(avatarModel)

View file

@ -7,6 +7,9 @@
<variable
name="backClickListener"
type="View.OnClickListener" />
<variable
name="mergeCallsClickListener"
type="View.OnClickListener" />
<variable
name="viewModel"
type="org.linphone.ui.call.viewmodel.CallsViewModel" />
@ -39,10 +42,24 @@
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:text="@string/calls_list_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintEnd_toStartOf="@id/merge"
app:layout_constraintStart_toEndOf="@id/back"
app:layout_constraintTop_toTopOf="parent"/>
<ImageView
android:id="@+id/merge"
android:onClick="@{mergeCallsClickListener}"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:padding="15dp"
android:adjustViewBounds="true"
android:src="@drawable/arrows_merge"
android:visibility="@{viewModel.callsCount > 1 ? View.VISIBLE : View.GONE}"
app:tint="?attr/color_main1_500"
app:layout_constraintBottom_toBottomOf="@id/title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/title"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/calls_list"
android:layout_width="0dp"