mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
remove support for observablevalues from templateview
it's not used, and so params haven't been standardized trying to unify it, it messes up overriding update in RoomView that extends it to set the timelineViewModel upon update.
This commit is contained in:
parent
d6645cbba9
commit
d70a57a7c9
@ -40,14 +40,10 @@ export class TemplateView {
|
||||
}
|
||||
|
||||
_subscribe() {
|
||||
this._boundUpdateFromValue = this._updateFromValue.bind(this);
|
||||
|
||||
if (typeof this._value.on === "function") {
|
||||
this._boundUpdateFromValue = this._updateFromValue.bind(this);
|
||||
this._value.on("change", this._boundUpdateFromValue);
|
||||
}
|
||||
else if (typeof this._value.subscribe === "function") {
|
||||
this._value.subscribe(this._boundUpdateFromValue);
|
||||
}
|
||||
}
|
||||
|
||||
_unsubscribe() {
|
||||
@ -55,9 +51,6 @@ export class TemplateView {
|
||||
if (typeof this._value.off === "function") {
|
||||
this._value.off("change", this._boundUpdateFromValue);
|
||||
}
|
||||
else if (typeof this._value.unsubscribe === "function") {
|
||||
this._value.unsubscribe(this._boundUpdateFromValue);
|
||||
}
|
||||
this._boundUpdateFromValue = null;
|
||||
}
|
||||
}
|
||||
@ -103,17 +96,14 @@ export class TemplateView {
|
||||
v.unmount();
|
||||
}
|
||||
}
|
||||
if (typeof this._value.dispose === "function") {
|
||||
this._value.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
root() {
|
||||
return this._root;
|
||||
}
|
||||
|
||||
_updateFromValue() {
|
||||
this.update(this._value);
|
||||
_updateFromValue(changedProps) {
|
||||
this.update(this._value, changedProps);
|
||||
}
|
||||
|
||||
update(value) {
|
||||
|
Loading…
Reference in New Issue
Block a user