diff --git a/src/main/kotlin/com/looker/droidify/ui/compose/pages/app_detail/components/TextBlock.kt b/src/main/kotlin/com/looker/droidify/ui/compose/pages/app_detail/components/TextBlock.kt index 12034341..18a25488 100644 --- a/src/main/kotlin/com/looker/droidify/ui/compose/pages/app_detail/components/TextBlock.kt +++ b/src/main/kotlin/com/looker/droidify/ui/compose/pages/app_detail/components/TextBlock.kt @@ -31,7 +31,8 @@ import de.charlex.compose.HtmlText @Composable fun HtmlTextBlock( modifier: Modifier = Modifier, - description: String + description: String, + isExpandable: Boolean = true ) { Column( modifier = modifier.fillMaxWidth(), @@ -58,7 +59,7 @@ fun HtmlTextBlock( overflow = TextOverflow.Ellipsis ) } - if (description.length >= 290) { + if (description.length >= 290 && isExpandable) { FilledTonalButton(onClick = { isExpanded = !isExpanded }) { Text(text = stringResource(id = if (isExpanded) R.string.show_less else R.string.show_more)) } diff --git a/src/main/kotlin/com/looker/droidify/ui/fragments/AppSheetX.kt b/src/main/kotlin/com/looker/droidify/ui/fragments/AppSheetX.kt index e72e122f..2764d408 100644 --- a/src/main/kotlin/com/looker/droidify/ui/fragments/AppSheetX.kt +++ b/src/main/kotlin/com/looker/droidify/ui/fragments/AppSheetX.kt @@ -655,7 +655,10 @@ class AppSheetX() : FullscreenBottomSheetDialogFragment(), Callbacks { positive = true, preExpanded = true ) { - HtmlTextBlock(description = product.whatsNew) + HtmlTextBlock( + description = product.whatsNew, + isExpandable = false + ) } } }