Skip to content

Commit

Permalink
fix: cardview errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Verassitnh committed Oct 19, 2024
1 parent 53f3db1 commit 8dc517b
Showing 1 changed file with 36 additions and 37 deletions.
73 changes: 36 additions & 37 deletions app/src/main/java/com/example/objectionapp/CardView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,47 +62,46 @@ fun PostCardRender(
.height(90.dp)
.clip(RoundedCornerShape(12.dp))
)
Column(
Modifier.padding(horizontal = 10.dp, vertical = 12.dp),
verticalArrangement = Arrangement.spacedBy(2.dp)
) {
type.supertitle?.let {
Text(
it,
color = MaterialTheme.colorScheme.onSurfaceVariant,
fontSize = 10.sp,
fontWeight = FontWeight.SemiBold,
)
}
title?.let {
Text(
it,
color = MaterialTheme.colorScheme.onSurfaceVariant,
fontSize = 16.sp,
fontWeight = FontWeight.Bold,
)
}
subtitle?.let {
Text(
it,
fontSize = 12.sp,
color = MaterialTheme.colorScheme.primary
)
}
type.additionalInfo?.let {
Text(
it,
fontSize = 14.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant,
fontWeight = FontWeight.Bold
)
Column(
Modifier.padding(horizontal = 10.dp, vertical = 12.dp),
verticalArrangement = Arrangement.spacedBy(2.dp)
) {
type.supertitle?.let {
Text(
it,
color = MaterialTheme.colorScheme.onSurfaceVariant,
fontSize = 10.sp,
fontWeight = FontWeight.SemiBold,
)
}
title?.let {
Text(
it,
color = MaterialTheme.colorScheme.onSurfaceVariant,
fontSize = 16.sp,
fontWeight = FontWeight.Bold,
)
}
subtitle?.let {
Text(
it,
fontSize = 12.sp,
color = MaterialTheme.colorScheme.primary
)
}
type.additionalInfo?.let {
Text(
it,
fontSize = 14.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant,
fontWeight = FontWeight.Bold
)
}
}

}
}
}


@OptIn(ExperimentalSharedTransitionApi::class)
@Composable
fun CardRender(
Expand Down Expand Up @@ -130,7 +129,7 @@ fun CardRender(
subtitle = obj.subtitle
)
// is PageType.Profile -> ProfileCardRender(objectId, isVertical)
is PageType.Plain -> PlainCardRender(objectId, isVertical)
// is PageType.Plain -> PlainCardRender(objectId, isVertical)
else -> return@Card
}
}
Expand Down

0 comments on commit 8dc517b

Please sign in to comment.