feat(ui, localizations): add unread messages label

This commit is contained in:
Salvatore Giordano
2022-06-17 11:41:25 +02:00
parent 57d176a69c
commit f3ab200137
13 changed files with 163 additions and 7 deletions
@@ -77,6 +77,10 @@ abstract class Translations {
/// contains a parent message
String threadSeparatorText(int replyCount);
/// The text for showing the unread messages count
/// in the [StreamMessageListView]
String unreadMessagesSeparatorText(int unreadCount);
/// The label for "connected" in [StreamConnectionStatusBuilder]
String get connectedLabel;
@@ -711,4 +715,12 @@ Attachment limit exceeded: it's not possible to add more than $limit attachments
@override
String get linkDisabledError => 'Links are disabled';
@override
String unreadMessagesSeparatorText(int unreadCount) {
if (unreadCount == 1) {
return '1 unread message';
}
return '$unreadCount unread messages';
}
}