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:
parent
a19214c033
commit
f09c92a14a
1 changed files with 3 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue