don't recreate the reactions after clearing it with the last one removed
This commit is contained in:
parent
cc444fa207
commit
1385a22e60
1 changed files with 5 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue