mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
Merge pull request #391 from n-peugnet/fix-add-reaction-increment
Fix redraw of incremented reaction counts
This commit is contained in:
commit
1b097337df
1 changed files with 2 additions and 1 deletions
|
@ -133,9 +133,10 @@ func newUIMessage(evt *muksevt.Event, displayname string, renderer MessageRender
|
||||||
|
|
||||||
func (msg *UIMessage) AddReaction(key string) {
|
func (msg *UIMessage) AddReaction(key string) {
|
||||||
found := false
|
found := false
|
||||||
for _, rs := range msg.Reactions {
|
for i, rs := range msg.Reactions {
|
||||||
if rs.Key == key {
|
if rs.Key == key {
|
||||||
rs.Count++
|
rs.Count++
|
||||||
|
msg.Reactions[i] = rs
|
||||||
found = true
|
found = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue