1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 18:02:15 -05:00

Fix linkification of text/plain messages with URLs starting at index 0

of the body.

Possibly the fix for issue 213 and maybe also issue 55
This commit is contained in:
Daniel Applebaum 2009-01-13 03:39:59 +00:00
parent 65bbc7e68a
commit 5b49112a98

View File

@ -839,7 +839,7 @@ public class MessageView extends Activity
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
while (m.find()) { while (m.find()) {
int start = m.start(); int start = m.start();
if (start != 0 && text.charAt(start - 1) != '@') { if (start == 0 || (start != 0 && text.charAt(start - 1) != '@')) {
m.appendReplacement(sb, "<a href=\"$0\">$0</a>"); m.appendReplacement(sb, "<a href=\"$0\">$0</a>");
} }
else { else {