This commit is contained in:
stom79 2019-01-31 18:59:58 +01:00
parent 137bba3741
commit 4c2542cd09
2 changed files with 3 additions and 2 deletions

View File

@ -867,10 +867,10 @@ public class Status implements Parcelable{
}
SpannableString spannableStringT;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
spannableStringT = new SpannableString(Html.fromHtml(spannableString.toString(), Html.FROM_HTML_SEPARATOR_LINE_BREAK_PARAGRAPH));
spannableStringT = new SpannableString(Html.fromHtml(spannableString.toString().replaceAll("^<p>","").replaceAll("<p>","<br/><br/>").replaceAll("</p>",""), Html.FROM_HTML_MODE_LEGACY));
else
//noinspection deprecation
spannableStringT = new SpannableString(Html.fromHtml(spannableString.toString()));
spannableStringT = new SpannableString(Html.fromHtml(spannableString.toString().replaceAll("^<p>","").replaceAll("<p>","<br/><br/>").replaceAll("</p>","")));
URLSpan[] spans = spannableStringT.getSpans(0, spannableStringT.length(), URLSpan.class);
for (URLSpan span : spans) {

View File

@ -264,6 +264,7 @@
<fr.gouv.etalab.mastodon.helper.CustomTextView
android:id="@+id/status_content"
android:textIsSelectable="true"
android:layout_marginBottom="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button