Changing from String to String?

This commit is contained in:
Hritik Wadhwa 2020-04-08 00:32:07 +05:30
parent b9c3b28154
commit 9d17ee965e

View File

@ -44,7 +44,7 @@ object StyleUtils {
}
@Suppress("DEPRECATION")
@JvmStatic fun String.fromHtml(): Spanned {
@JvmStatic fun String?.fromHtml(): Spanned {
return if (VERSION.SDK_INT >= VERSION_CODES.N) Html.fromHtml(this, Html.FROM_HTML_MODE_LEGACY)
else Html.fromHtml(this)
}