Skip to content

Commit be308eb

Browse files
fixed bug with refreshing count of replies
1 parent 4efe94e commit be308eb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Sources/StreamChatSwiftUI/ChatChannel/MessageList/MessageContainerView.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ struct MessageContainerView<Factory: ViewFactory>: View {
8484
MessageRepliesView(
8585
factory: factory,
8686
channel: channel,
87-
message: message
87+
message: message,
88+
replyCount: message.replyCount
8889
)
8990
}
9091

Sources/StreamChatSwiftUI/ChatChannel/MessageList/MessageRepliesView.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ struct MessageRepliesView<Factory: ViewFactory>: View {
1414
var factory: Factory
1515
var channel: ChatChannel
1616
var message: ChatMessage
17+
var replyCount: Int
1718

1819
var threadDestination: Factory.MessageThreadDestination {
1920
let threadDestination = factory.makeMessageThreadDestination()
@@ -31,7 +32,7 @@ struct MessageRepliesView<Factory: ViewFactory>: View {
3132
size: .init(width: 16, height: 16)
3233
)
3334
}
34-
Text("\(message.replyCount) \(repliesText)")
35+
Text("\(replyCount) \(repliesText)")
3536
.font(fonts.footnoteBold)
3637
if message.isSentByCurrentUser {
3738
MessageAvatarView(

0 commit comments

Comments
 (0)