Skip to content

Commit

Permalink
[AND-216] Fix error message text being overridden by moderation messa…
Browse files Browse the repository at this point in the history
…ge. (#5551)

* [AND-216] Fix error message text being overridden by moderation message.

* [AND-216] Update CHANGELOG.md.

---------

Co-authored-by: PetarVelikov <[email protected]>
  • Loading branch information
VelikovPetar and PetarVelikov authored Jan 13, 2025
1 parent d3a197c commit 0891620
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@

## stream-chat-android-compose
### 🐞 Fixed
- Fix error messages text being overridden by the default error message. [#5551](https://github.com/GetStream/stream-chat-android/pull/5551)

### ⬆️ Improved

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ internal fun DefaultMessageModeratedContent(moderatedMessageItemState: Moderated
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 12.dp, horizontal = 16.dp),
text = stringResource(id = R.string.stream_compose_message_moderated),
text = moderatedMessageItemState.message.text
.takeUnless { it.isBlank() }
?: stringResource(id = R.string.stream_compose_message_moderated),
color = ChatTheme.colors.textLowEmphasis,
style = ChatTheme.typography.footnoteBold,
textAlign = TextAlign.Center,
Expand Down

0 comments on commit 0891620

Please sign in to comment.