From abe5099c07faddc0aec1e96e091ff5f8c106246a Mon Sep 17 00:00:00 2001 From: martinmitrevski Date: Wed, 6 Dec 2023 15:46:24 +0100 Subject: [PATCH] Text changes --- .../ChatChannel/ChatChannelDataSource.swift | 1 + .../ChatChannel/MessageList/MessageListView.swift | 2 +- .../Resources/en.lproj/Localizable.stringsdict | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Sources/StreamChatSwiftUI/ChatChannel/ChatChannelDataSource.swift b/Sources/StreamChatSwiftUI/ChatChannel/ChatChannelDataSource.swift index b3f43877..daecacfd 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/ChatChannelDataSource.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/ChatChannelDataSource.swift @@ -42,6 +42,7 @@ protocol ChannelDataSource: AnyObject { /// Determines whether all new messages have been fetched. var hasLoadedAllNextMessages: Bool { get } + /// Returns the first unread message id. var firstUnreadMessageId: String? { get } /// Loads the previous messages. diff --git a/Sources/StreamChatSwiftUI/ChatChannel/MessageList/MessageListView.swift b/Sources/StreamChatSwiftUI/ChatChannel/MessageList/MessageListView.swift index 0d628172..846ca2a1 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/MessageList/MessageListView.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/MessageList/MessageListView.swift @@ -423,7 +423,7 @@ public struct NewMessagesIndicator: View { public var body: some View { HStack { - Text("Unread messages") + Text("\(L10n.MessageList.newMessages(count))") .foregroundColor(Color(colors.textLowEmphasis)) .font(.headline) .padding(.all, 8) diff --git a/Sources/StreamChatSwiftUI/Resources/en.lproj/Localizable.stringsdict b/Sources/StreamChatSwiftUI/Resources/en.lproj/Localizable.stringsdict index 9ba6adad..a9167e5e 100644 --- a/Sources/StreamChatSwiftUI/Resources/en.lproj/Localizable.stringsdict +++ b/Sources/StreamChatSwiftUI/Resources/en.lproj/Localizable.stringsdict @@ -67,11 +67,11 @@ NSStringFormatValueTypeKey d zero - %d new messages + New messages one - %d new message + New messages other - %d new messages + New messages messageList.typingIndicator.users