aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
index 10179d7e9..c08b41f05 100644
--- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
+++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
@@ -356,10 +356,15 @@ public class MessageAdapter extends ArrayAdapter<Message> {
while (matcher.find()) {
urlCount++;
}
+ Matcher geoMatcher = GeoHelper.GEO_URI.matcher(body);
+ while (matcher.find()) {
+ urlCount++;
+ }
viewHolder.messageBody.setTextIsSelectable(urlCount <= 1);
viewHolder.messageBody.setAutoLinkMask(0);
Linkify.addLinks(viewHolder.messageBody, Linkify.WEB_URLS);
Linkify.addLinks(viewHolder.messageBody, XMPP_PATTERN, "xmpp");
+ Linkify.addLinks(viewHolder.messageBody, GeoHelper.GEO_URI, "geo");
} else {
viewHolder.messageBody.setText("");
viewHolder.messageBody.setTextIsSelectable(false);