Rename Nitter instances

This commit is contained in:
Thomas 2022-12-21 18:58:40 +01:00
parent 5de4360f38
commit 5e619d7e5c
2 changed files with 19 additions and 1 deletions

View file

@ -254,6 +254,14 @@ public class SpannableHelper {
if (urlDetails.containsKey(url)) { if (urlDetails.containsKey(url)) {
continue; continue;
} }
ClickableSpan[] clickableSpans = content.getSpans(matchStart, matchEnd, ClickableSpan.class);
if (clickableSpans != null) {
for (ClickableSpan clickableSpan : clickableSpans) {
content.removeSpan(clickableSpan);
}
}
content.removeSpan(clickableSpans);
String newURL = Helper.transformURL(context, url); String newURL = Helper.transformURL(context, url);
//If URL has been transformed //If URL has been transformed
if (newURL.compareTo(url) != 0) { if (newURL.compareTo(url) != 0) {
@ -514,6 +522,15 @@ public class SpannableHelper {
if (content.toString().length() < matchEnd || matchStart < 0 || matchStart > matchEnd) { if (content.toString().length() < matchEnd || matchStart < 0 || matchStart > matchEnd) {
continue; continue;
} }
ClickableSpan[] clickableSpans = content.getSpans(matchStart, matchEnd, ClickableSpan.class);
if (clickableSpans != null) {
for (ClickableSpan clickableSpan : clickableSpans) {
content.removeSpan(clickableSpan);
}
}
content.removeSpan(clickableSpans);
if (matchEnd <= content.length()) { if (matchEnd <= content.length()) {
content.setSpan(new LongClickableSpan() { content.setSpan(new LongClickableSpan() {
@Override @Override

View file

@ -6,3 +6,4 @@ Changed:
Fixed: Fixed:
- Nav buttons not visible with media (Light theme) - Nav buttons not visible with media (Light theme)
- Status bar with Android 5 - Status bar with Android 5
- Fix links not clickable