fix late initialization of InfoView component

This commit is contained in:
or-else
2025-09-24 19:38:29 +03:00
parent 679276c2e2
commit c70e5ebf7e
9 changed files with 25 additions and 10 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+8 -1
View File
@@ -185,6 +185,7 @@ class InfoView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
previousMetaDesc: undefined,
previousSubsUpdated: undefined
};
this.propsUpdated = this.propsUpdated.bind(this);
this.resetSubs = this.resetSubs.bind(this);
this.resetDesc = this.resetDesc.bind(this);
this.resetTags = this.resetTags.bind(this);
@@ -203,7 +204,7 @@ class InfoView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
this.handleContextMenu = this.handleContextMenu.bind(this);
this.handleBackNavigate = this.handleBackNavigate.bind(this);
}
componentDidUpdate(props) {
propsUpdated(props) {
const topic = this.props.tinode.getTopic(props.topic);
if (!topic) {
return;
@@ -223,6 +224,12 @@ class InfoView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
this.resetTags(topic);
}
}
componentDidMount() {
this.propsUpdated(this.props);
}
componentDidUpdate(props) {
this.propsUpdated(props);
}
componentWillUnmount() {
const topic = this.props.tinode.getTopic(this.props.topic);
if (!topic) {
File diff suppressed because one or more lines are too long
-1
View File
@@ -3496,7 +3496,6 @@ class TopicMe extends _topic_js__WEBPACK_IMPORTED_MODULE_2__["default"] {
}
}
_processMetaDesc(desc) {
console.log("_processMetaDesc", desc);
const turnOff = desc.acs && !desc.acs.isPresencer() && this.acs && this.acs.isPresencer();
(0,_utils_js__WEBPACK_IMPORTED_MODULE_3__.mergeObj)(this, desc);
this._tinode._db.updTopic(this);
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long