|
|
|
@ -138,9 +138,19 @@ class ReadRssViewModel(application: Application) : BaseViewModel(application), |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fun clHtml(content: String): String { |
|
|
|
|
return if (content.contains("<style>".toRegex())) { |
|
|
|
|
return when { |
|
|
|
|
!rssSource?.style.isNullOrEmpty() -> { |
|
|
|
|
""" |
|
|
|
|
<style> |
|
|
|
|
${rssSource?.style} |
|
|
|
|
</style> |
|
|
|
|
$content |
|
|
|
|
""".trimIndent() |
|
|
|
|
} |
|
|
|
|
content.contains("<style>".toRegex()) -> { |
|
|
|
|
content |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
else -> { |
|
|
|
|
""" |
|
|
|
|
<style> |
|
|
|
|
img{max-width:100% !important; width:auto; height:auto;} |
|
|
|
@ -151,6 +161,7 @@ class ReadRssViewModel(application: Application) : BaseViewModel(application), |
|
|
|
|
""".trimIndent() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Synchronized |
|
|
|
|
override fun onInit(status: Int) { |
|
|
|
|