revent premature subscription on reload

This commit is contained in:
or-else
2019-02-24 19:45:02 +03:00
parent 79970cf558
commit 9193b9be19
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ class MessagesView extends React.Component {
}
}
if (topic && !topic.isSubscribed() &&
if (topic && !topic.isSubscribed() && this.props.tinode.isAuthenticated() &&
((!prevProps.connected && this.props.connected) || (this.state.topic != prevState.topic))) {
// Don't request the tags. They are useless unless the user
// is the owner and is editing the topic.
+1 -1
View File
@@ -2676,7 +2676,7 @@ var MessagesView = function (_React$Component) {
}
}
if (topic && !topic.isSubscribed() && (!prevProps.connected && this.props.connected || this.state.topic != prevState.topic)) {
if (topic && !topic.isSubscribed() && this.props.tinode.isAuthenticated() && (!prevProps.connected && this.props.connected || this.state.topic != prevState.topic)) {
var getQuery = topic.startMetaQuery().withLaterDesc().withLaterSub().withLaterData(_config_js__WEBPACK_IMPORTED_MODULE_12__["MESSAGES_PAGE"]).withLaterDel();
var setQuery = tinode_sdk__WEBPACK_IMPORTED_MODULE_2___default.a.isNewGroupTopicName(this.props.topic) ? this.props.newGroupTopicParams : undefined;
this.setState({
+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
File diff suppressed because one or more lines are too long