diff --git a/feature/metis/conversation/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/conversation/ui/post/PostItem.kt b/feature/metis/conversation/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/conversation/ui/post/PostItem.kt index c527f52c2..de525d19c 100644 --- a/feature/metis/conversation/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/conversation/ui/post/PostItem.kt +++ b/feature/metis/conversation/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/conversation/ui/post/PostItem.kt @@ -425,7 +425,8 @@ private fun HeadlineProfilePicture( private fun HeadlineAuthorRoleBadge( authorRole: UserRole?, ) { - val (text, color) = when (authorRole) { + val initialAuthorRole = remember { mutableStateOf(authorRole) } + val (text, color) = when (initialAuthorRole.value) { UserRole.INSTRUCTOR -> R.string.post_instructor to PostColors.Roles.instructor UserRole.TUTOR -> R.string.post_tutor to PostColors.Roles.tutor UserRole.USER -> R.string.post_student to PostColors.Roles.student