Changing new messages separator text
This commit is contained in:
@@ -81,7 +81,7 @@ abstract class Translations {
|
||||
|
||||
/// The text for showing the unread messages count
|
||||
/// in the [StreamMessageListView]
|
||||
String unreadMessagesSeparatorText(int unreadCount);
|
||||
String unreadMessagesSeparatorText();
|
||||
|
||||
/// The label for "connected" in [StreamConnectionStatusBuilder]
|
||||
String get connectedLabel;
|
||||
@@ -797,12 +797,7 @@ Attachment limit exceeded: it's not possible to add more than $limit attachments
|
||||
String get linkDisabledError => 'Links are disabled';
|
||||
|
||||
@override
|
||||
String unreadMessagesSeparatorText(int unreadCount) {
|
||||
if (unreadCount == 1) {
|
||||
return '1 unread message';
|
||||
}
|
||||
return '$unreadCount unread messages';
|
||||
}
|
||||
String unreadMessagesSeparatorText() => 'New messages';
|
||||
|
||||
@override
|
||||
String get enableFileAccessMessage => 'Please enable access to files'
|
||||
|
||||
+1
-3
@@ -24,9 +24,7 @@ class UnreadMessagesSeparator extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: Text(
|
||||
context.translations.unreadMessagesSeparatorText(
|
||||
unreadCount,
|
||||
),
|
||||
context.translations.unreadMessagesSeparatorText(),
|
||||
textAlign: TextAlign.center,
|
||||
style: StreamChannelHeaderTheme.of(context).subtitleStyle,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user