Skip to content

Commit

Permalink
Update Unread Messages Label
Browse files Browse the repository at this point in the history
  • Loading branch information
JcMinarro authored and kanat committed Feb 26, 2024
1 parent a7c8d6d commit e79c108
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,8 @@ internal fun DefaultMessageUnreadSeparatorContent(unreadSeparatorItemState: Unre
) {
Text(
modifier = Modifier.padding(vertical = 2.dp, horizontal = 16.dp),
text = LocalContext.current.resources.getQuantityString(
R.plurals.stream_compose_message_list_unread_separator,
unreadSeparatorItemState.unreadCount,
unreadSeparatorItemState.unreadCount,
text = LocalContext.current.resources.getString(
R.string.stream_compose_message_list_unread_separator,
),
style = ChatTheme.messageUnreadSeparatorTheme.textStyle,
)
Expand Down
6 changes: 1 addition & 5 deletions stream-chat-android-compose/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,7 @@
<item quantity="one">%d Reply</item>
<item quantity="other">%d Replies</item>
</plurals>
<plurals name="stream_compose_message_list_unread_separator">
<item quantity="zero">Unread Message</item>
<item quantity="one">%d Unread Message</item>
<item quantity="other">%d Unread Messages</item>
</plurals>
<string name="stream_compose_message_list_unread_separator">Unread Messages</string>
<string name="stream_compose_message_list_empty_messages">No messages</string>
<string name="stream_compose_message_list_error_cannot_open_link">There is no app to view this url:\n%s</string>
<string name="stream_compose_message_list_unsupported_attachment">Unsupported attachment</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ internal class UnreadSeparatorViewHolder(

binding.root.setBackgroundColor(style.unreadSeparatorBackgroundColor)
binding.unreadSeparatorLabel.setTextStyle(style.unreadSeparatorTextStyle)
binding.unreadSeparatorLabel.text = context.resources.getQuantityString(
R.plurals.stream_ui_message_list_unread_separator,
data.unreadCount,
data.unreadCount,
)
binding.unreadSeparatorLabel.text =
context.resources.getString(R.string.stream_ui_message_list_unread_separator)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@
<item quantity="one">%d Reply</item>
<item quantity="other">%d Replies</item>
</plurals>
<plurals name="stream_ui_message_list_unread_separator">
<item quantity="zero">Unread Message</item>
<item quantity="one">%d Unread Message</item>
<item quantity="other">%d Unread Messages</item>
</plurals>
<string name="stream_ui_message_list_unread_separator">Unread Messages</string>
<string name="stream_ui_message_list_translated">Translated to %s</string>

<!-- Message Actions Dialog -->
Expand Down

0 comments on commit e79c108

Please sign in to comment.