Merge pull request #397 from n-peugnet/fix-message-redraw-first-reaction
Do not recalculate the buffer on first reaction
This commit is contained in:
commit
26b3c51053
@ -920,11 +920,10 @@ func (view *RoomView) AddReaction(evt *muksevt.Event, key string) {
|
|||||||
// Message not in view, nothing to do
|
// Message not in view, nothing to do
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
recalculate := len(msg.Reactions) == 0
|
heightChanged := len(msg.Reactions) == 0
|
||||||
msg.AddReaction(key)
|
msg.AddReaction(key)
|
||||||
if recalculate {
|
if heightChanged {
|
||||||
// Recalculate height for message
|
// Replace buffer to update height of message
|
||||||
msg.CalculateBuffer(msgView.prevPrefs, msgView.prevWidth())
|
|
||||||
msgView.replaceBuffer(msg, msg)
|
msgView.replaceBuffer(msg, msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user