forked from mystiq/hydrogen-web
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();
|
||||
this._roomVM = roomVM;
|
||||
this._isEmpty = true;
|
||||
this._replyId = null;
|
||||
this._replyVM = null;
|
||||
}
|
||||
|
||||
setReplyingTo(entry) {
|
||||
const newId = entry?.id || null;
|
||||
const changed = this._replyId !== newId;
|
||||
const changed = this._replyVM?.internalId !== entry?.asEventKey().toString();
|
||||
if (changed) {
|
||||
this._replyId = newId;
|
||||
if (this._replyVM) {
|
||||
this.untrack(this._replyVM);
|
||||
this._replyVM.dispose();
|
||||
|
|
Loading…
Reference in a new issue