diff --git a/app/src/main/java/app/fedilab/android/helper/SpannableHelper.java b/app/src/main/java/app/fedilab/android/helper/SpannableHelper.java index 77cc88e0..55bfb356 100644 --- a/app/src/main/java/app/fedilab/android/helper/SpannableHelper.java +++ b/app/src/main/java/app/fedilab/android/helper/SpannableHelper.java @@ -254,6 +254,14 @@ public class SpannableHelper { if (urlDetails.containsKey(url)) { 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); //If URL has been transformed if (newURL.compareTo(url) != 0) { @@ -514,6 +522,15 @@ public class SpannableHelper { if (content.toString().length() < matchEnd || matchStart < 0 || matchStart > matchEnd) { 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()) { content.setSpan(new LongClickableSpan() { @Override diff --git a/src/fdroid/fastlane/metadata/android/en/changelogs/452.txt b/src/fdroid/fastlane/metadata/android/en/changelogs/452.txt index 754cefcb..1d1da373 100644 --- a/src/fdroid/fastlane/metadata/android/en/changelogs/452.txt +++ b/src/fdroid/fastlane/metadata/android/en/changelogs/452.txt @@ -5,4 +5,5 @@ Changed: Fixed: - Nav buttons not visible with media (Light theme) -- Status bar with Android 5 \ No newline at end of file +- Status bar with Android 5 +- Fix links not clickable \ No newline at end of file