Fixes an issue where a '/' on the end of a URL in a toot to be translated causes the __u?__ tag to remain after translation.

This commit is contained in:
PhotonQyv 2017-09-05 20:37:11 +01:00
parent 7ef423abd8
commit 241407887a
1 changed files with 4 additions and 0 deletions

View File

@ -356,6 +356,10 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
while (matcher.find()){
String key = "__u" + String.valueOf(i) + "__";
String value = matcher.group(0);
int end = matcher.end();
if (spannableString.charAt(end) == '/') {
text = spannableString.toString().substring(0, end).concat(spannableString.toString().substring(end+1, spannableString.length()));
}
if( value != null) {
urlConversion.put(key, value);
text = text.replace(value, key);