mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-25 05:28:32 +00:00
Fixed wrong participant LIME status being displayed
This commit is contained in:
parent
5b3460d1e7
commit
ff201529ba
1 changed files with 8 additions and 5 deletions
|
|
@ -28,10 +28,8 @@ import org.linphone.core.Participant
|
||||||
import org.linphone.utils.LinphoneUtils
|
import org.linphone.utils.LinphoneUtils
|
||||||
|
|
||||||
class DevicesListGroupData(private val participant: Participant) : GenericContactData(participant.address) {
|
class DevicesListGroupData(private val participant: Participant) : GenericContactData(participant.address) {
|
||||||
private val device = if (participant.devices.isEmpty()) null else participant.devices.first()
|
|
||||||
|
|
||||||
val securityLevelIcon: Int by lazy {
|
val securityLevelIcon: Int by lazy {
|
||||||
when (device?.securityLevel) {
|
when (participant.securityLevel) {
|
||||||
ChatRoomSecurityLevel.Safe -> R.drawable.security_2_indicator
|
ChatRoomSecurityLevel.Safe -> R.drawable.security_2_indicator
|
||||||
ChatRoomSecurityLevel.Encrypted -> R.drawable.security_1_indicator
|
ChatRoomSecurityLevel.Encrypted -> R.drawable.security_1_indicator
|
||||||
else -> R.drawable.security_alert_indicator
|
else -> R.drawable.security_alert_indicator
|
||||||
|
|
@ -39,7 +37,7 @@ class DevicesListGroupData(private val participant: Participant) : GenericContac
|
||||||
}
|
}
|
||||||
|
|
||||||
val securityLevelContentDescription: Int by lazy {
|
val securityLevelContentDescription: Int by lazy {
|
||||||
when (device?.securityLevel) {
|
when (participant.securityLevel) {
|
||||||
ChatRoomSecurityLevel.Safe -> R.string.content_description_security_level_safe
|
ChatRoomSecurityLevel.Safe -> R.string.content_description_security_level_safe
|
||||||
ChatRoomSecurityLevel.Encrypted -> R.string.content_description_security_level_encrypted
|
ChatRoomSecurityLevel.Encrypted -> R.string.content_description_security_level_encrypted
|
||||||
else -> R.string.content_description_security_level_unsafe
|
else -> R.string.content_description_security_level_unsafe
|
||||||
|
|
@ -68,6 +66,11 @@ class DevicesListGroupData(private val participant: Participant) : GenericContac
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onClick() {
|
fun onClick() {
|
||||||
if (device?.address != null) coreContext.startCall(device.address, forceZRTP = true)
|
val device = if (participant.devices.isEmpty()) null else participant.devices.first()
|
||||||
|
if (device?.address != null) {
|
||||||
|
coreContext.startCall(device.address, forceZRTP = true)
|
||||||
|
} else {
|
||||||
|
coreContext.startCall(participant.address, forceZRTP = true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue