mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
Properly emit change in reply tile
This commit is contained in:
parent
eb8eb71cdb
commit
54ffb1cbe2
@ -49,16 +49,16 @@ export class ComposerViewModel extends ViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_updateReplyEntry(entry) {
|
_updateReplyEntry(entry) {
|
||||||
const update = this._replyVM.updateEntry(entry);
|
const action = this._replyVM.updateEntry(entry);
|
||||||
if (update.shouldReplace) {
|
if (action.shouldReplace) {
|
||||||
const newTile = this._roomVM._createTile(entry);
|
const newTile = this._roomVM._createTile(entry);
|
||||||
this._replyVM.dispose();
|
this._replyVM.dispose();
|
||||||
this._replyVM = newTile || null;
|
this._replyVM = newTile || null;
|
||||||
} else if (update.shouldRemove) {
|
} else if (action.shouldRemove) {
|
||||||
this._replyVM.dispose();
|
this._replyVM.dispose();
|
||||||
this._replyVM = null;
|
this._replyVM = null;
|
||||||
} else if (update.shouldUpdate) {
|
} else if (action.shouldUpdate) {
|
||||||
// Nothing, since we'll be calling emitChange anyway.
|
this._replyVM.emitChange(action.updateParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user