From bba50650a064a27b67c5d40a5363f155ff673c65 Mon Sep 17 00:00:00 2001 From: Martin Felber Date: Sat, 21 Dec 2024 11:39:20 +0100 Subject: [PATCH] Fix implementation bug --- .../conversation/ui/post/ConversationBottomSheetUiTest.kt | 3 --- .../native_app/feature/metis/shared/content/dto/AnswerPost.kt | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/feature/metis/conversation/src/test/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/conversation/ui/post/ConversationBottomSheetUiTest.kt b/feature/metis/conversation/src/test/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/conversation/ui/post/ConversationBottomSheetUiTest.kt index b0348d47f..f3ec11891 100644 --- a/feature/metis/conversation/src/test/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/conversation/ui/post/ConversationBottomSheetUiTest.kt +++ b/feature/metis/conversation/src/test/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/conversation/ui/post/ConversationBottomSheetUiTest.kt @@ -103,7 +103,6 @@ class ConversationBottomSheetUiTest : BaseChatUITest() { @Test fun `test GIVEN a basePost from user WHEN long pressing on another user's answer THEN resolve option is shown`() { - val answerContent = "Answer content" setupThreadUi( post = simpleThreadPostWithAnswer( postAuthor = currentUser, @@ -120,7 +119,6 @@ class ConversationBottomSheetUiTest : BaseChatUITest() { @Test fun `test GIVEN a basePost from another user WHEN long pressing on another user's answer as tutor THEN resolve option is shown`() { - val answerContent = "Answer content" setupThreadUi( post = simpleThreadPostWithAnswer( postAuthor = otherUser, @@ -138,7 +136,6 @@ class ConversationBottomSheetUiTest : BaseChatUITest() { @Test fun `test GIVEN a basePost from another user WHEN long pressing on a users answer THEN resolve option is not shown`() { - val answerContent = "Answer content" setupThreadUi( post = simpleThreadPostWithAnswer( postAuthor = otherUser, diff --git a/feature/metis/shared/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/shared/content/dto/AnswerPost.kt b/feature/metis/shared/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/shared/content/dto/AnswerPost.kt index ecb8cf85a..3177f29c4 100644 --- a/feature/metis/shared/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/shared/content/dto/AnswerPost.kt +++ b/feature/metis/shared/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/shared/content/dto/AnswerPost.kt @@ -25,7 +25,7 @@ data class AnswerPost( override val authorId: Long? = author?.id @Transient - override val parentAuthorId: Long? = author?.id + override val parentAuthorId: Long? = post?.authorId @Transient override val serverPostId: Long? = id