use internalId to compare so we don't have to cache the entry id separately
This commit is contained in:
parent
5426908444
commit
3feaf38252
1 changed files with 1 additions and 4 deletions
|
@ -21,15 +21,12 @@ export class ComposerViewModel extends ViewModel {
|
||||||
super();
|
super();
|
||||||
this._roomVM = roomVM;
|
this._roomVM = roomVM;
|
||||||
this._isEmpty = true;
|
this._isEmpty = true;
|
||||||
this._replyId = null;
|
|
||||||
this._replyVM = null;
|
this._replyVM = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
setReplyingTo(entry) {
|
setReplyingTo(entry) {
|
||||||
const newId = entry?.id || null;
|
const changed = this._replyVM?.internalId !== entry?.asEventKey().toString();
|
||||||
const changed = this._replyId !== newId;
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
this._replyId = newId;
|
|
||||||
if (this._replyVM) {
|
if (this._replyVM) {
|
||||||
this.untrack(this._replyVM);
|
this.untrack(this._replyVM);
|
||||||
this._replyVM.dispose();
|
this._replyVM.dispose();
|
||||||
|
|
Reference in a new issue