mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Fix an issue
This commit is contained in:
parent
bbbc8e00cc
commit
13575706de
1 changed files with 9 additions and 3 deletions
|
@ -94,7 +94,6 @@ public class SpannableHelper {
|
|||
private static Spannable convert(@NonNull Context context, @NonNull Status status, String text) {
|
||||
return convert(context, status, text, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert HTML content to text. Also, it handles click on link and transform emoji
|
||||
* This needs to be run asynchronously
|
||||
|
@ -1144,7 +1143,14 @@ public class SpannableHelper {
|
|||
if (text == null) {
|
||||
return null;
|
||||
}
|
||||
if (!limitedToDisplayName) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
||||
initialContent = new SpannableString(Html.fromHtml(text, Html.FROM_HTML_MODE_LEGACY));
|
||||
else
|
||||
initialContent = new SpannableString(Html.fromHtml(text));
|
||||
} else {
|
||||
initialContent = new SpannableString(text);
|
||||
}
|
||||
SpannableStringBuilder content = new SpannableStringBuilder(initialContent);
|
||||
URLSpan[] urls = content.getSpans(0, (content.length() - 1), URLSpan.class);
|
||||
for (URLSpan span : urls)
|
||||
|
|
Loading…
Reference in a new issue