Skip to content

Commit

Permalink
Add the podcast html description to the database
Browse files Browse the repository at this point in the history
  • Loading branch information
geekygecko committed Dec 18, 2024
1 parent 36d07e1 commit 23c4944
Show file tree
Hide file tree
Showing 5 changed files with 1,885 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,17 @@ class PodcastAdapter(
with(holder.binding.bottom.nextText) {
text = podcast.displayableNextEpisodeDate(context)
}
holder.binding.bottom.description.text = if (FeatureFlag.isEnabled(Feature.PODCAST_HTML_DESCRIPTION)) {
Html.fromHtml(podcast.podcastDescription, Html.FROM_HTML_MODE_COMPACT).trimPadding()
} else {
podcast.podcastDescription
}
holder.binding.bottom.description.text =
if (FeatureFlag.isEnabled(Feature.PODCAST_HTML_DESCRIPTION) && podcast.podcastHtmlDescription.isNotEmpty()) {
// keep the extra line break from paragraphs as it looks better
Html.fromHtml(
podcast.podcastHtmlDescription,
Html.FROM_HTML_MODE_COMPACT and
Html.FROM_HTML_SEPARATOR_LINE_BREAK_PARAGRAPH.inv(),
).trimPadding()
} else {
podcast.podcastDescription
}
holder.binding.bottom.description.setLinkTextColor(tintColor)
holder.binding.bottom.description.readMore(3)
holder.binding.bottom.authorText.text = podcast.author
Expand Down
Loading

0 comments on commit 23c4944

Please sign in to comment.