REFACTOR: spacing
This commit is contained in:
parent
a0ff2b2eeb
commit
ec813b1389
1 changed files with 3 additions and 12 deletions
|
@ -931,16 +931,7 @@ fun String.isBlockedNumberPattern() = contains("*")
|
|||
|
||||
fun String?.fromHtml(): Spanned =
|
||||
when {
|
||||
this == null -> {
|
||||
// return an empty spannable if the html is null
|
||||
SpannableString("")
|
||||
}
|
||||
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.N -> {
|
||||
Html.fromHtml(this, Html.FROM_HTML_MODE_LEGACY)
|
||||
}
|
||||
|
||||
else -> {
|
||||
Html.fromHtml(this)
|
||||
}
|
||||
this == null -> SpannableString("")
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.N -> Html.fromHtml(this, Html.FROM_HTML_MODE_LEGACY)
|
||||
else -> Html.fromHtml(this)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue