From 1385a22e60a78ab868c4dbb2f924ed25e59f5de8 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 3 Jun 2021 21:00:57 +0200 Subject: [PATCH] don't recreate the reactions after clearing it with the last one removed --- .../room/timeline/tiles/BaseMessageTile.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/domain/session/room/timeline/tiles/BaseMessageTile.js b/src/domain/session/room/timeline/tiles/BaseMessageTile.js index 7742a7c5..e319e317 100644 --- a/src/domain/session/room/timeline/tiles/BaseMessageTile.js +++ b/src/domain/session/room/timeline/tiles/BaseMessageTile.js @@ -143,19 +143,12 @@ export class BaseMessageTile extends SimpleTile { if (!annotations) { if (this._reactions) { this._reactions = null; - this.emitChange("reactions"); } - } - let isNewMap = false; - if (!this._reactions) { - this._reactions = new ReactionsViewModel(this); - isNewMap = true; - } - - this._reactions.update(annotations); - - if (isNewMap) { - this.emitChange("reactions"); + } else { + if (!this._reactions) { + this._reactions = new ReactionsViewModel(this); + } + this._reactions.update(annotations); } } }