Fixed double click handler in chat messages for SIP addresses
This commit is contained in:
parent
619a13eb97
commit
8a29c4be61
1 changed files with 2 additions and 2 deletions
|
@ -189,10 +189,10 @@ class ChatMessageData(val chatMessage: ChatMessage) : GenericContactData(chatMes
|
|||
list.add(data)
|
||||
} else if (content.isText) {
|
||||
val spannable = Spannable.Factory.getInstance().newSpannable(content.utf8Text?.trim())
|
||||
LinkifyCompat.addLinks(spannable, Linkify.WEB_URLS or Linkify.EMAIL_ADDRESSES or Linkify.PHONE_NUMBERS)
|
||||
LinkifyCompat.addLinks(spannable, Linkify.WEB_URLS or Linkify.PHONE_NUMBERS)
|
||||
text.value = PatternClickableSpan()
|
||||
.add(
|
||||
Pattern.compile("(sips?):([^@]+)(?:@([^ ]+))?"),
|
||||
Pattern.compile("((sips?):)?([^@]+)(?:@([^ ]+))?"),
|
||||
object : PatternClickableSpan.SpannableClickedListener {
|
||||
override fun onSpanClicked(text: String) {
|
||||
Log.i("[Chat Message Data] Clicked on SIP URI: $text")
|
||||
|
|
Loading…
Reference in a new issue