mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +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
|
@Composable
|
||||||
fun HtmlTextBlock(
|
fun HtmlTextBlock(
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
description: String
|
description: String,
|
||||||
|
isExpandable: Boolean = true
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
modifier = modifier.fillMaxWidth(),
|
modifier = modifier.fillMaxWidth(),
|
||||||
@ -58,7 +59,7 @@ fun HtmlTextBlock(
|
|||||||
overflow = TextOverflow.Ellipsis
|
overflow = TextOverflow.Ellipsis
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (description.length >= 290) {
|
if (description.length >= 290 && isExpandable) {
|
||||||
FilledTonalButton(onClick = { isExpanded = !isExpanded }) {
|
FilledTonalButton(onClick = { isExpanded = !isExpanded }) {
|
||||||
Text(text = stringResource(id = if (isExpanded) R.string.show_less else R.string.show_more))
|
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,
|
positive = true,
|
||||||
preExpanded = true
|
preExpanded = true
|
||||||
) {
|
) {
|
||||||
HtmlTextBlock(description = product.whatsNew)
|
HtmlTextBlock(
|
||||||
|
description = product.whatsNew,
|
||||||
|
isExpandable = false
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user