mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 03:12:15 +00:00
Fix: Changelog block showing an expand button
This commit is contained in:
parent
380792a36e
commit
0aa1ff9e22
@ -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))
|
||||
}
|
||||
|
@ -655,7 +655,10 @@ class AppSheetX() : FullscreenBottomSheetDialogFragment(), Callbacks {
|
||||
positive = true,
|
||||
preExpanded = true
|
||||
) {
|
||||
HtmlTextBlock(description = product.whatsNew)
|
||||
HtmlTextBlock(
|
||||
description = product.whatsNew,
|
||||
isExpandable = false
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user