Prevent call trusted toast to be displayed multiple times + fixed number of paused calls when > 2

This commit is contained in:
Sylvain Berfini 2024-01-23 11:44:27 +01:00
parent 3a240f107c
commit 8c068d3be7
2 changed files with 4 additions and 2 deletions

View file

@ -224,7 +224,7 @@ class CallsViewModel @UiThread constructor() : ViewModel() {
}
} else {
otherCallsLabel.postValue(
AppUtils.getFormattedString(R.string.calls_paused_count_label, core.callsNb)
AppUtils.getFormattedString(R.string.calls_paused_count_label, core.callsNb - 1)
)
otherCallsStatus.postValue("") // TODO: improve ?
}

View file

@ -694,7 +694,9 @@ class CurrentCallViewModel @UiThread constructor() : ViewModel() {
Log.i(
"$TAG Current call media encryption is ZRTP, auth token is ${if (isDeviceTrusted) "trusted" else "not trusted yet"}"
)
isRemoteDeviceTrusted.postValue(isDeviceTrusted)
if (isDeviceTrusted != isRemoteDeviceTrusted.value) {
isRemoteDeviceTrusted.postValue(isDeviceTrusted)
}
val securityLevel = if (isDeviceTrusted) SecurityLevel.Safe else SecurityLevel.Encrypted
val avatarModel = contact.value
if (avatarModel != null) {