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 (!annotations) {
|
||||||
if (this._reactions) {
|
if (this._reactions) {
|
||||||
this._reactions = null;
|
this._reactions = null;
|
||||||
this.emitChange("reactions");
|
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
let isNewMap = false;
|
if (!this._reactions) {
|
||||||
if (!this._reactions) {
|
this._reactions = new ReactionsViewModel(this);
|
||||||
this._reactions = new ReactionsViewModel(this);
|
}
|
||||||
isNewMap = true;
|
this._reactions.update(annotations);
|
||||||
}
|
|
||||||
|
|
||||||
this._reactions.update(annotations);
|
|
||||||
|
|
||||||
if (isNewMap) {
|
|
||||||
this.emitChange("reactions");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue