Keep displaying contact's trust level even if e2e encryption isn't mandatory

This commit is contained in:
Sylvain Berfini 2024-05-07 13:19:54 +02:00
parent 1a5bc838b9
commit 121f400732
2 changed files with 2 additions and 4 deletions

View file

@ -603,7 +603,7 @@ class ContactsManager @UiThread constructor() {
@WorkerThread
fun updateContactsModelDependingOnDefaultAccountMode() {
val account = coreContext.core.defaultAccount
val showTrust = account?.isEndToEndEncryptionMandatory() == true
val showTrust = true
Log.i(
"$TAG Default account mode is [${if (showTrust) "end-to-end encryption mandatory" else "interoperable"}], update all contact models showTrust value"
)

View file

@ -22,7 +22,6 @@ package org.linphone.ui.main.contacts.model
import android.net.Uri
import androidx.annotation.WorkerThread
import androidx.lifecycle.MutableLiveData
import org.linphone.LinphoneApplication.Companion.coreContext
import org.linphone.R
import org.linphone.contacts.AbstractAvatarModel
import org.linphone.contacts.getNativeContactPictureUri
@ -31,7 +30,6 @@ import org.linphone.core.ConsolidatedPresence
import org.linphone.core.Friend
import org.linphone.core.FriendListenerStub
import org.linphone.core.tools.Log
import org.linphone.ui.main.model.isEndToEndEncryptionMandatory
import org.linphone.utils.AppUtils
import org.linphone.utils.TimestampUtils
@ -87,7 +85,7 @@ class ContactAvatarModel @WorkerThread constructor(val friend: Friend, val addre
isFavourite.postValue(friend.starred)
initials.postValue(AppUtils.getInitials(friend.name.orEmpty()))
showTrust.postValue(coreContext.core.defaultAccount?.isEndToEndEncryptionMandatory())
showTrust.postValue(true)
picturePath.postValue(getAvatarUri(friend).toString())
name.postValue(friend.name)