diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-02-10 17:52:02 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-02-10 17:52:02 +0100 |
commit | ee460b64d867b977b651f4a6d6df3598cceca261 (patch) | |
tree | 8c6eb0a579a157cbfb808341a797e63fe9c43564 /src/main/java/de/pixart | |
parent | 1bfc1103dc286163043ea2cfefa096a592ccca05 (diff) |
do not auto link non-http URLs
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java | 4 |
1 files changed, 2 insertions, 2 deletions
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<Message> 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("://")); } }; |