Commit 668fea41 authored by Andrey Startsev's avatar Andrey Startsev

Make phone numbers in media captions clickable

parent 6033ee2f
...@@ -737,7 +737,7 @@ public class MessageObject { ...@@ -737,7 +737,7 @@ public class MessageObject {
caption = Emoji.replaceEmoji(messageOwner.media.caption, textPaint.getFontMetricsInt(), AndroidUtilities.dp(20), false); caption = Emoji.replaceEmoji(messageOwner.media.caption, textPaint.getFontMetricsInt(), AndroidUtilities.dp(20), false);
if (containsUrls(caption)) { if (containsUrls(caption)) {
try { try {
Linkify.addLinks((Spannable) caption, Linkify.WEB_URLS); Linkify.addLinks((Spannable) caption, Linkify.WEB_URLS | Linkify.PHONE_NUMBERS);
} catch (Exception e) { } catch (Exception e) {
FileLog.e("tmessages", e); FileLog.e("tmessages", e);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment