revent premature subscription on reload
This commit is contained in:
@@ -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
@@ -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({
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user