Skip to content

Commit

Permalink
Fixed merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
FelberMartin committed Nov 26, 2024
1 parent 9159639 commit f9935f9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import de.tum.informatics.www1.artemis.native_app.core.data.DataState
import de.tum.informatics.www1.artemis.native_app.core.data.isSuccess
import de.tum.informatics.www1.artemis.native_app.core.data.orNull
import de.tum.informatics.www1.artemis.native_app.core.ui.common.BasicDataStateUi
import de.tum.informatics.www1.artemis.native_app.core.ui.markdown.ProvideMarkwon
import de.tum.informatics.www1.artemis.native_app.core.ui.remote_images.ProfilePictureImageProvider
import de.tum.informatics.www1.artemis.native_app.feature.metis.conversation.R
import de.tum.informatics.www1.artemis.native_app.feature.metis.conversation.service.EmojiService
Expand Down Expand Up @@ -298,20 +297,20 @@ private fun PostAndRepliesList(
item {
val postActions = rememberPostActions(post)

Column(
modifier = Modifier.fillMaxWidth(),
verticalArrangement = Arrangement.spacedBy(8.dp)
) {
PostWithBottomSheet(
modifier = Modifier.padding(top = 8.dp),
post = post,
postItemViewType = PostItemViewType.ThreadContextPostItem,
postActions = postActions,
displayHeader = true,
clientId = clientId,
profilePictureImageProvider = profilePictureImageProvider,
onClick = {}
)
Column(
modifier = Modifier.fillMaxWidth(),
verticalArrangement = Arrangement.spacedBy(8.dp)
) {
PostWithBottomSheet(
modifier = Modifier.padding(top = 8.dp),
post = post,
postItemViewType = PostItemViewType.ThreadContextPostItem,
postActions = postActions,
profilePictureImageProvider = profilePictureImageProvider,
displayHeader = true,
clientId = clientId,
onClick = {}
)

Divider()

Expand All @@ -324,25 +323,24 @@ private fun PostAndRepliesList(
key = { _, post -> post.postId }) { index, answerPost ->
val postActions = rememberPostActions(answerPost)

PostWithBottomSheet(
modifier = Modifier
.fillMaxWidth()
.testTag(testTagForAnswerPost(answerPost.clientPostId)),
PostWithBottomSheet(
modifier = Modifier
.fillMaxWidth()
.testTag(testTagForAnswerPost(answerPost.clientPostId)),
post = answerPost,
postActions = postActions,
profilePictureImageProvider = profilePictureImageProvider,
postItemViewType = PostItemViewType.ThreadAnswerItem,
clientId = clientId,
displayHeader = shouldDisplayHeader(
index = index,
post = answerPost,
postActions = postActions,
postItemViewType = PostItemViewType.ThreadAnswerItem,
clientId = clientId,
displayHeader = shouldDisplayHeader(
index = index,
post = answerPost,
postCount = post.orderedAnswerPostings.size,
order = DisplayPostOrder.REGULAR,
getPost = post.orderedAnswerPostings::get
),
profilePictureImageProvider = profilePictureImageProvider,
onClick = {}
)
}
postCount = post.orderedAnswerPostings.size,
order = DisplayPostOrder.REGULAR,
getPost = post.orderedAnswerPostings::get
),
onClick = {}
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ConversationProfilePictureUiTest : BaseComposeTest() {
}


fun setupUi(
private fun setupUi(
post: PostPojo
) {
composeTestRule.setContent {
Expand All @@ -95,6 +95,7 @@ class ConversationProfilePictureUiTest : BaseComposeTest() {
courseId = courseId,
state = LazyListState(),
isReplyEnabled = false,
markdownImageLoader = null,
profilePictureImageProvider = profilePictureImageProvider,
emojiService = EmojiServiceStub,
onCreatePost = { CompletableDeferred() },
Expand All @@ -103,7 +104,6 @@ class ConversationProfilePictureUiTest : BaseComposeTest() {
onRequestReactWithEmoji = { _, _, _ -> CompletableDeferred() },
onClickViewPost = {},
onRequestRetrySend = {},
imageLoaderCreation = { CompletableDeferred() },
title = "title",
)
}
Expand Down

0 comments on commit f9935f9

Please sign in to comment.