Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions app/src/main/java/com/paulcoding/hviewer/ui/page/posts/PostsPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.paulcoding.hviewer.ui.page.posts
import android.widget.Toast
import androidx.compose.animation.animateContentSize
import androidx.compose.animation.core.tween
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
Expand Down Expand Up @@ -200,20 +199,21 @@ fun PostCard(
viewPost: () -> Unit
) {
Card(
elevation = CardDefaults.cardElevation(8.dp),
elevation = CardDefaults.cardElevation(4.dp),
modifier = Modifier
.padding(horizontal = 16.dp, vertical = 12.dp)
.animateContentSize(
animationSpec = tween(durationMillis = 300)
),
shape = MaterialTheme.shapes.medium,
.padding(horizontal = 16.dp, vertical = 12.dp),
border = CardDefaults.outlinedCardBorder(),
shape = CardDefaults.outlinedShape,
onClick = { viewPost() },
) {
Box(modifier = Modifier.fillMaxSize()) {
Column(modifier = Modifier
.padding(8.dp)
.clickable {
viewPost()
}) {
Box(
modifier = Modifier
.fillMaxSize()
.animateContentSize(
animationSpec = tween(durationMillis = 300)
),
) {
Column(modifier = Modifier.padding(8.dp)) {
HImage(
url = postItem.thumbnail
)
Expand Down
Loading