Skip to content

Commit

Permalink
Merge pull request #391 from n-peugnet/fix-add-reaction-increment
Browse files Browse the repository at this point in the history
Fix redraw of incremented reaction counts
  • Loading branch information
tulir committed Oct 18, 2022
2 parents ae10e8e + 8c3c4d3 commit 1b09733
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/messages/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@ func newUIMessage(evt *muksevt.Event, displayname string, renderer MessageRender

func (msg *UIMessage) AddReaction(key string) {
found := false
for _, rs := range msg.Reactions {
for i, rs := range msg.Reactions {
if rs.Key == key {
rs.Count++
msg.Reactions[i] = rs
found = true
break
}
Expand Down

0 comments on commit 1b09733

Please sign in to comment.