diff --git a/app/build.gradle b/app/build.gradle index ed85f281a..c516f8ce2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -290,7 +290,7 @@ dependencies { // Jetpack Compose implementation(platform('androidx.compose:compose-bom:2024.06.00')) - implementation 'androidx.compose.material3:material3' + implementation 'androidx.compose.material3:material3:1.3.0-beta04' implementation 'androidx.activity:activity-compose' implementation 'androidx.compose.ui:ui-tooling-preview' implementation 'androidx.compose.ui:ui-text:1.7.0-beta04' // Needed for parsing HTML to AnnotatedString diff --git a/app/src/main/java/org/schabi/newpipe/compose/util/ParseDescription.kt b/app/src/main/java/org/schabi/newpipe/compose/util/ParseDescription.kt index 567a106ed..3ffbac558 100644 --- a/app/src/main/java/org/schabi/newpipe/compose/util/ParseDescription.kt +++ b/app/src/main/java/org/schabi/newpipe/compose/util/ParseDescription.kt @@ -4,7 +4,10 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.ParagraphStyle +import androidx.compose.ui.text.SpanStyle +import androidx.compose.ui.text.TextLinkStyles import androidx.compose.ui.text.fromHtml +import androidx.compose.ui.text.style.TextDecoration import org.schabi.newpipe.extractor.stream.Description @Composable @@ -12,7 +15,8 @@ fun rememberParsedDescription(description: Description): AnnotatedString { // TODO: Handle links and hashtags, Markdown. return remember(description) { if (description.type == Description.HTML) { - AnnotatedString.fromHtml(description.content) + val styles = TextLinkStyles(SpanStyle(textDecoration = TextDecoration.Underline)) + AnnotatedString.fromHtml(description.content, styles) } else { AnnotatedString(description.content, ParagraphStyle()) }