1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 09:47:13 +00:00

Thread safe toHtml (2)

This commit is contained in:
M66B 2023-03-21 18:45:27 +01:00
parent a19214c033
commit f09c92a14a

View file

@ -76,9 +76,10 @@ public class HtmlEx {
* @return string containing input converted to HTML
*/
public /* static */ String toHtml(Spanned text, int option) {
SpannableStringBuilder ssb = new SpannableStringBuilderEx(text);
if (!Helper.isUiThread())
text = new SpannableStringBuilderEx(text);
StringBuilder out = new StringBuilder();
withinHtml(out, ssb, option);
withinHtml(out, text, option);
return out.toString();
}