fix: comment start padding (#868)
This commit is contained in:
parent
0f5d4155af
commit
1f05bdeedf
@ -83,7 +83,12 @@ fun CommentCard(
|
|||||||
depth = comment.depth,
|
depth = comment.depth,
|
||||||
commentBarTheme = commentBarTheme,
|
commentBarTheme = commentBarTheme,
|
||||||
)
|
)
|
||||||
val barWidth = BAR_BASE_WIDTH_UNIT * barThickness
|
val barWidth =
|
||||||
|
if (comment.depth > 0) {
|
||||||
|
BAR_BASE_WIDTH_UNIT * barThickness
|
||||||
|
} else {
|
||||||
|
0.dp
|
||||||
|
}
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
@ -95,7 +100,9 @@ fun CommentCard(
|
|||||||
onDoubleClick = onDoubleClick ?: {},
|
onDoubleClick = onDoubleClick ?: {},
|
||||||
).padding(
|
).padding(
|
||||||
start =
|
start =
|
||||||
indentAmount.takeIf { it > 0 }?.let {
|
indentAmount.takeIf {
|
||||||
|
it > 0 && comment.depth > 0
|
||||||
|
}?.let {
|
||||||
(it * comment.depth).dp + Spacing.xxxs
|
(it * comment.depth).dp + Spacing.xxxs
|
||||||
} ?: 0.dp,
|
} ?: 0.dp,
|
||||||
),
|
),
|
||||||
@ -103,7 +110,7 @@ fun CommentCard(
|
|||||||
Column(
|
Column(
|
||||||
modifier =
|
modifier =
|
||||||
Modifier
|
Modifier
|
||||||
.padding(start = barWidth + Spacing.xxs)
|
.padding(start = barWidth)
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(
|
.padding(
|
||||||
vertical = Spacing.xxs,
|
vertical = Spacing.xxs,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user