mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-24 20:14:53 +01:00
don't recreate the reactions after clearing it with the last one removed
This commit is contained in:
parent
cc444fa207
commit
1385a22e60
@ -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");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user