Fixed address being displayed with gruu when using 'bis' button on diaer & in contact editor
This commit is contained in:
parent
61d2fdbe10
commit
3aafed8677
4 changed files with 6 additions and 8 deletions
|
@ -49,9 +49,7 @@ class CallViewModelFactory(private val call: Call) :
|
|||
|
||||
open class CallViewModel(val call: Call) : GenericContactViewModel(call.remoteAddress) {
|
||||
val address: String by lazy {
|
||||
val copy = call.remoteAddress.clone()
|
||||
copy.clean() // To remove gruu if any
|
||||
LinphoneUtils.getDisplayableAddress(copy)
|
||||
LinphoneUtils.getDisplayableAddress(call.remoteAddress)
|
||||
}
|
||||
|
||||
val isPaused = MutableLiveData<Boolean>()
|
||||
|
|
|
@ -77,7 +77,7 @@ class DetailCallLogFragment : GenericFragment<HistoryDetailFragmentBinding>() {
|
|||
val copy = viewModel.callLog.remoteAddress.clone()
|
||||
copy.clean()
|
||||
Log.i("[History] Creating contact with SIP URI: ${copy.asStringUriOnly()}")
|
||||
navigateToContacts(viewModel.callLog.remoteAddress.asStringUriOnly())
|
||||
navigateToContacts(copy.asStringUriOnly())
|
||||
}
|
||||
|
||||
binding.setContactClickListener {
|
||||
|
|
|
@ -45,9 +45,7 @@ class CallLogViewModelFactory(private val callLog: CallLog) :
|
|||
|
||||
class CallLogViewModel(val callLog: CallLog) : GenericContactViewModel(callLog.remoteAddress) {
|
||||
val peerSipUri: String by lazy {
|
||||
val copy = callLog.remoteAddress.clone()
|
||||
copy.clean() // To remove gruu if any
|
||||
LinphoneUtils.getDisplayableAddress(copy)
|
||||
LinphoneUtils.getDisplayableAddress(callLog.remoteAddress)
|
||||
}
|
||||
|
||||
val statusIconResource: Int by lazy {
|
||||
|
|
|
@ -49,7 +49,9 @@ class LinphoneUtils {
|
|||
return if (corePreferences.replaceSipUriByUsername) {
|
||||
address.username ?: address.asStringUriOnly()
|
||||
} else {
|
||||
address.asStringUriOnly()
|
||||
val copy = address.clone()
|
||||
copy.clean() // To remove gruu if any
|
||||
copy.asStringUriOnly()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue