Skip to content

Commit e210f44

Browse files
fixed reactions redraw
1 parent 0bc559a commit e210f44

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/StreamChatSwiftUI/ChatChannel/ChatChannelViewModel.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,11 @@ extension ChatMessage: Identifiable {
269269

270270
var reactionScoresId: String {
271271
var output = ""
272-
for (key, score) in reactionScores {
272+
let sorted = reactionScores.keys.sorted { type1, type2 in
273+
type1.id > type2.id
274+
}
275+
for key in sorted {
276+
let score = reactionScores[key] ?? 0
273277
output += "\(key.rawValue)\(score)"
274278
}
275279
return output

0 commit comments

Comments
 (0)