- In chat and call lists, if userpart of peer URI is an E.164 number,

show only the userpart.
- In chat list, show only the first line of the message.
This commit is contained in:
Juha Heinanen
2019-11-20 09:28:43 +02:00
parent e00c9a4590
commit 1876dd76a2
5 changed files with 14 additions and 24 deletions
@@ -56,15 +56,10 @@ class ChatActivity : AppCompatActivity() {
this@ChatActivity.window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN)
var chatPeer = ContactsActivity.contactName(peerUri)
if (chatPeer.startsWith("sip:")) {
if (Utils.checkTelNo(Utils.uriUserPart(peerUri)) ||
(Utils.uriHostPart(peerUri) == Utils.aorDomain(aor)))
chatPeer = Utils.uriUserPart(peerUri)
else
chatPeer = chatPeer.substring(4)
}
if (chatPeer.startsWith("sip:"))
chatPeer = Utils.friendlyUri(chatPeer, Utils.aorDomain(aor))
setTitle(String.format(getString(R.string.chat_with), chatPeer))
title = String.format(getString(R.string.chat_with), chatPeer)
val headerView = findViewById(R.id.account) as TextView
val headerText = "${getString(R.string.account)} ${aor.substringAfter(":")}"