Skip to content

Commit

Permalink
added authorRole mutableState
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-wls committed Jan 3, 2025
1 parent c8ef563 commit 990ba1b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 990ba1b

Please sign in to comment.