From ee460b64d867b977b651f4a6d6df3598cceca261 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Fri, 10 Feb 2017 17:52:02 +0100 Subject: do not auto link non-http URLs --- src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/de/pixart') diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java index 058da3c33..f8eb6e044 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -107,8 +107,8 @@ public class MessageAdapter extends ArrayAdapter implements CopyTextVie }; private static final Linkify.MatchFilter WEBURL_MATCH_FILTER = new Linkify.MatchFilter() { @Override - public boolean acceptMatch(CharSequence charSequence, int start, int end) { - return start < 1 || charSequence.charAt(start - 1) != '@'; + public boolean acceptMatch(CharSequence cs, int start, int end) { + return start < 1 || (cs.charAt(start - 1) != '@' && !cs.subSequence(Math.max(0, start - 3), start).equals("://")); } }; -- cgit v1.2.3