Fix scheduled-post card edges around the rounded corners

This commit is contained in:
davotoula
2026-05-07 21:23:55 +02:00
parent 1c4159f3b0
commit d9f1237ff3
2 changed files with 5 additions and 3 deletions
@@ -166,7 +166,7 @@ fun ConfirmDeleteBackground(
if (!settled) {
Color(0xFFFF1744)
} else {
MaterialTheme.colorScheme.surfaceVariant
Color.Transparent
},
label = "ConfirmDeleteBackground",
)
@@ -71,7 +71,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.drawBehind
import androidx.compose.ui.draw.drawWithContent
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Brush
@@ -267,7 +267,8 @@ private fun Modifier.urgentEdge(enabled: Boolean): Modifier {
remember(gradientStart, gradientEnd) {
Brush.verticalGradient(listOf(gradientStart, gradientEnd))
}
return this.drawBehind {
return this.drawWithContent {
drawContent()
drawRect(
brush = brush,
topLeft = Offset(0f, 8.dp.toPx()),
@@ -318,6 +319,7 @@ private fun ScheduledPostCardCollapsed(
modifier =
Modifier
.fillMaxWidth()
.clip(RoundedCornerShape(14.dp))
.urgentEdge(!isFailed && post.publishAtSec - nowSec in 1..URGENT_THRESHOLD_SEC),
colors = CardDefaults.cardColors(containerColor = containerColor),
border = BorderStroke(1.dp, borderColor),