Compare commits
1
Commits
62338bb0a4
..
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf2854a029 |
@@ -70,17 +70,22 @@ fun LinkPreviewCard(
|
|||||||
compact: Boolean,
|
compact: Boolean,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
|
// Every element of the Modifier chain stays on ONE line, which is why the shape
|
||||||
|
// and the two paddings are named first. `standard:chain-method-continuation`
|
||||||
|
// wants a `.` that follows a MULTILINE element glued to its closing paren —
|
||||||
|
// `).padding(…)` — which is unreadable, so the multiline element is avoided
|
||||||
|
// instead (Scribe #3110).
|
||||||
|
val shape = RoundedCornerShape(PREVIEW_RADIUS)
|
||||||
|
val padH = if (compact) 8.dp else 10.dp
|
||||||
|
val padV = if (compact) 6.dp else 8.dp
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
modifier =
|
modifier =
|
||||||
modifier
|
modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.clip(RoundedCornerShape(PREVIEW_RADIUS))
|
.clip(shape)
|
||||||
.border(
|
.border(1.dp, MaterialTheme.colorScheme.outlineVariant, shape)
|
||||||
1.dp,
|
.padding(horizontal = padH, vertical = padV),
|
||||||
MaterialTheme.colorScheme.outlineVariant,
|
|
||||||
RoundedCornerShape(PREVIEW_RADIUS),
|
|
||||||
)
|
|
||||||
.padding(horizontal = if (compact) 8.dp else 10.dp, vertical = if (compact) 6.dp else 8.dp),
|
|
||||||
) {
|
) {
|
||||||
preview.siteName?.takeIf { it.isNotBlank() }?.let { site ->
|
preview.siteName?.takeIf { it.isNotBlank() }?.let { site ->
|
||||||
Text(
|
Text(
|
||||||
|
|||||||
Reference in New Issue
Block a user