fix: comment and post headers

This commit is contained in:
Diego Beraldin 2023-10-19 13:57:28 +02:00
parent da8d6fc3f0
commit 3826653010
3 changed files with 36 additions and 31 deletions

View File

@ -350,11 +350,10 @@ class UserDetailScreen(
content = {
PostCard(
modifier = Modifier.onClick {
navigator?.push(
PostDetailScreen(post),
)
navigator?.push(PostDetailScreen(post = post))
},
post = post,
hideAuthor = true,
postLayout = uiState.postLayout,
fullHeightImage = uiState.fullHeightImages,
blurNsfw = uiState.blurNsfw,
@ -400,9 +399,7 @@ class UserDetailScreen(
}
},
onOpenCommunity = { community ->
navigator?.push(
CommunityDetailScreen(community),
)
navigator?.push(CommunityDetailScreen(community))
},
onReply = if (isOnOtherInstance) {
null
@ -496,7 +493,9 @@ class UserDetailScreen(
},
content = {
CommentCard(
modifier = Modifier.onClick {
modifier = Modifier
.background(MaterialTheme.colorScheme.background)
.onClick {
navigator?.push(
PostDetailScreen(
post = PostModel(id = comment.postId),
@ -564,8 +563,8 @@ class UserDetailScreen(
bottomSheetNavigator.show(screen)
}
},
onOpenCommunity = {
navigator?.push(CommunityDetailScreen(it))
onOpenCommunity = { community ->
navigator?.push(CommunityDetailScreen(community))
},
)
Divider(

View File

@ -1,5 +1,6 @@
package com.github.diegoberaldin.raccoonforlemmy.feature.profile.logged
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
@ -236,7 +237,9 @@ internal object ProfileLoggedScreen : Tab {
}
itemsIndexed(uiState.comments) { idx, comment ->
CommentCard(
modifier = Modifier.onClick {
modifier = Modifier
.background(MaterialTheme.colorScheme.background)
.onClick {
navigator?.push(
PostDetailScreen(
post = PostModel(id = comment.postId),

View File

@ -1,5 +1,6 @@
package com.github.diegoberaldin.raccoonforlemmy.feature.search.main
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
@ -373,7 +374,9 @@ class ExploreScreen : Screen {
is CommentModel -> {
CommentCard(
modifier = Modifier.onClick {
modifier = Modifier
.background(MaterialTheme.colorScheme.background)
.onClick {
navigator?.push(
PostDetailScreen(
post = PostModel(id = result.postId),