Skip to content

Commit

Permalink
Animate reactions
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmitrevski committed Jun 24, 2024
1 parent 34602ab commit 817f0be
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -660,17 +660,18 @@ open class ChatChannelViewModel: ObservableObject, MessagesDataSource {
.remove(_, index: _):
return true
case let .update(message, index: index):
let animateReactions = message.reactionScoresId != messages[index.row].reactionScoresId
&& utils.messageListConfig.messageDisplayOptions.shouldAnimateReactions
if index.row < messages.count,
message.messageId != messages[index.row].messageId
|| message.type == .ephemeral
|| !message.linkAttachments.isEmpty {
if index.row < messages.count
&& (
message.reactionScoresId != messages[index.row].reactionScoresId
&& utils.messageListConfig.messageDisplayOptions.shouldAnimateReactions
) {
&& animateReactions {
animateChanges = message.linkAttachments.isEmpty
}
} else if animateReactions {
animateChanges = animateReactions
}
default:
break
Expand Down

0 comments on commit 817f0be

Please sign in to comment.