Skip to content

Commit 838f3ca

Browse files
nuno-vieiratestableapple
authored andcommitted
Fix attachments with very big size (#3771)
1 parent 98c09ee commit 838f3ca

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Sources/StreamChatUI/ChatMessageList/Reactions/ChatMessageReactions+Types.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import StreamChat
66
import UIKit
77

88
/// The information of a reaction ready to be displayed in a view.
9-
public struct ChatMessageReactionData {
9+
public struct ChatMessageReactionData: Equatable {
1010
/// The type of the reaction.
1111
public let type: MessageReactionType
1212
/// The score value of the reaction. By default it is the same value as `count`.

Sources/StreamChatUI/ChatMessageList/Reactions/ChatMessageReactionsView.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ import UIKit
88
/// The view that shows the list of reactions attached to the message.
99
open class ChatMessageReactionsView: _View, ThemeProvider {
1010
public var content: Content? {
11-
didSet { updateContentIfNeeded() }
11+
didSet {
12+
if oldValue?.reactions == content?.reactions {
13+
return
14+
}
15+
updateContentIfNeeded()
16+
}
1217
}
1318

1419
open var reactionItemView: ChatMessageReactionItemView.Type {
@@ -56,7 +61,6 @@ open class ChatMessageReactionsView: _View, ThemeProvider {
5661
)
5762
stackView.addArrangedSubview(itemView)
5863
}
59-
stackView.layoutIfNeeded()
6064
}
6165

6266
private func logWarning(unavailableReaction reaction: ChatMessageReactionData) {

0 commit comments

Comments
 (0)