findroid
findroid copied to clipboard
Linebreak (<br>) does not render in findroid
Describe the bug Line break html tags <br> do not render in show summaries or episode summaries. Summary just shows linebreak tag <br> instead of actually adding a new line. To Reproduce Steps to reproduce the behavior:
- Add <br> to text in a show or episode summary
- Open show summary in app
Expected behavior Line break to be rendered like in jellyfin web client.
Device info (please complete the following information):
- Device: Google Pixel Fold
- Android version: 13
- App version: 0.12.0 (20)
I presume this is because it doesn't parse any HTML, but I'd like to see this implemented too. Even if full support for HTML is out of scope, I think it would be nice if it could at least match certain tags like bold, italics and line breaks. Hopefully also anchors, because I have a few that link to their original source for YouTube videos and merged episodes (e.g. E01-E03).
I have looked up the document. It should be a rather simple fix.
https://github.com/jarnedemeulemeester/findroid/blob/07c58accf00e0d5dd497f1e74a0138639777fcd0/app/phone/src/main/java/dev/jdtech/jellyfin/adapters/EpisodeListAdapter.kt#L48
binding.episodeOverview.text = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
Html.fromHtml(episode.overview, Html.FROM_HTML_MODE_COMPACT)
} else {
Html.fromHtml(episode.overview)
}
android.text.Html is included in the standard library. It just needed to wrap overview's TextView.setText with Html.fromHtml.
@jarnedemeulemeester Are there any concerns that this cannot be implemented? Or should I create a PR for you?