another fix for #124
This commit is contained in:
@@ -253,12 +253,12 @@ class MessagesView extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (topic) {
|
if (topic) {
|
||||||
if ((this.state.topic != prevState.topic) || !prevProps.ready) {
|
if ((this.state.topic != prevState.topic) || (this.props.myUserId && !prevProps.myUserId)) {
|
||||||
// Don't immediately subscribe to a new p2p topic, wait for the first message.
|
// Don't immediately subscribe to a new p2p topic, wait for the first message.
|
||||||
const newTopic = (this.props.newTopicParams && this.props.newTopicParams._topicName == this.props.topic);
|
const newTopic = (this.props.newTopicParams && this.props.newTopicParams._topicName == this.props.topic);
|
||||||
if (topic.isP2PType() && newTopic && !IMMEDIATE_P2P_SUBSCRIPTION) {
|
if (topic.isP2PType() && newTopic && !IMMEDIATE_P2P_SUBSCRIPTION) {
|
||||||
topic.getMeta(topic.startMetaQuery().withDesc().build());
|
topic.getMeta(topic.startMetaQuery().withDesc().build());
|
||||||
} else {
|
} else if (this.props.myUserId) {
|
||||||
this.subscribe(topic);
|
this.subscribe(topic);
|
||||||
}
|
}
|
||||||
} else if (topic.isSubscribed() && this.state.isReader && !prevState.isReader) {
|
} else if (topic.isSubscribed() && this.state.isReader && !prevState.isReader) {
|
||||||
|
|||||||
+2
-2
@@ -5292,11 +5292,11 @@ class MessagesView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compone
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (topic) {
|
if (topic) {
|
||||||
if (this.state.topic != prevState.topic || !prevProps.ready) {
|
if (this.state.topic != prevState.topic || this.props.myUserId && !prevProps.myUserId) {
|
||||||
const newTopic = this.props.newTopicParams && this.props.newTopicParams._topicName == this.props.topic;
|
const newTopic = this.props.newTopicParams && this.props.newTopicParams._topicName == this.props.topic;
|
||||||
if (topic.isP2PType() && newTopic && !_config_js__WEBPACK_IMPORTED_MODULE_17__.IMMEDIATE_P2P_SUBSCRIPTION) {
|
if (topic.isP2PType() && newTopic && !_config_js__WEBPACK_IMPORTED_MODULE_17__.IMMEDIATE_P2P_SUBSCRIPTION) {
|
||||||
topic.getMeta(topic.startMetaQuery().withDesc().build());
|
topic.getMeta(topic.startMetaQuery().withDesc().build());
|
||||||
} else {
|
} else if (this.props.myUserId) {
|
||||||
this.subscribe(topic);
|
this.subscribe(topic);
|
||||||
}
|
}
|
||||||
} else if (topic.isSubscribed() && this.state.isReader && !prevState.isReader) {
|
} else if (topic.isSubscribed() && this.state.isReader && !prevState.isReader) {
|
||||||
|
|||||||
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