This commit is contained in:
@@ -1063,10 +1063,10 @@ class TinodeWeb extends React.Component {
|
|||||||
HashNavigation.navigateTo(HashNavigation.setUrlSidePanel(window.location.hash, hash));
|
HashNavigation.navigateTo(HashNavigation.setUrlSidePanel(window.location.hash, hash));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Request to start a topic, new or selected from search results.
|
// Request to start a topic, new or selected from search results, or "by ID".
|
||||||
handleStartTopicRequest(topicName, pub, priv, tags, isChannel) {
|
handleStartTopicRequest(topicName, pub, priv, tags, isChannel) {
|
||||||
// Check if topic is indeed new. If not, launch it.
|
// Check if topic is indeed new. If not, launch it.
|
||||||
if (topicName && this.tinode.getTopic(topicName)) {
|
if (topicName && this.tinode.isTopicCached(topicName)) {
|
||||||
this.handleTopicSelected(topicName);
|
this.handleTopicSelected(topicName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class NewTopicById extends React.PureComponent {
|
|||||||
description="Prompt for entering user or group ID">{
|
description="Prompt for entering user or group ID">{
|
||||||
(prompt) => <input type="text" placeholder={prompt}
|
(prompt) => <input type="text" placeholder={prompt}
|
||||||
value={this.state.groupId} onChange={this.handleChange}
|
value={this.state.groupId} onChange={this.handleChange}
|
||||||
onKeyPress={this.handleKeyPress} required />
|
onKeyPress={this.handleKeyPress} required autoFocus />
|
||||||
}</FormattedMessage>
|
}</FormattedMessage>
|
||||||
</div>
|
</div>
|
||||||
<div className="dialog-buttons">
|
<div className="dialog-buttons">
|
||||||
|
|||||||
+6
-2
@@ -2976,6 +2976,7 @@ class MessagesView extends react__WEBPACK_IMPORTED_MODULE_0___default.a.Componen
|
|||||||
|
|
||||||
if (topic && !topic.isSubscribed() && this.props.ready && (this.state.topic != prevState.topic || !prevProps.ready)) {
|
if (topic && !topic.isSubscribed() && this.props.ready && (this.state.topic != prevState.topic || !prevProps.ready)) {
|
||||||
const newTopic = this.props.newTopicParams && this.props.newTopicParams._topicName == this.props.topic;
|
const newTopic = this.props.newTopicParams && this.props.newTopicParams._topicName == this.props.topic;
|
||||||
|
console.log("new topic", newTopic, this.props.newTopicParams ? this.props.newTopicParams._topicName : '[null newTopicParams]', this.props.topic);
|
||||||
let getQuery = topic.startMetaQuery().withLaterDesc();
|
let getQuery = topic.startMetaQuery().withLaterDesc();
|
||||||
|
|
||||||
if (this.state.isSharer || newTopic && !topic.isChannel()) {
|
if (this.state.isSharer || newTopic && !topic.isChannel()) {
|
||||||
@@ -5199,6 +5200,8 @@ class TinodeWeb extends react__WEBPACK_IMPORTED_MODULE_0___default.a.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleTopicSelected(topicName) {
|
handleTopicSelected(topicName) {
|
||||||
|
console.log("handleTopicSelected", topicName, this.state.newTopicParams);
|
||||||
|
|
||||||
if (this.state.newTopicParams && this.state.newTopicParams._topicName != topicName) {
|
if (this.state.newTopicParams && this.state.newTopicParams._topicName != topicName) {
|
||||||
this.setState({
|
this.setState({
|
||||||
newTopicParams: null
|
newTopicParams: null
|
||||||
@@ -5571,7 +5574,7 @@ class TinodeWeb extends react__WEBPACK_IMPORTED_MODULE_0___default.a.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleStartTopicRequest(topicName, pub, priv, tags, isChannel) {
|
handleStartTopicRequest(topicName, pub, priv, tags, isChannel) {
|
||||||
if (topicName && this.tinode.getTopic(topicName)) {
|
if (topicName && this.tinode.isTopicCached(topicName)) {
|
||||||
this.handleTopicSelected(topicName);
|
this.handleTopicSelected(topicName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -9019,7 +9022,8 @@ class NewTopicById extends react__WEBPACK_IMPORTED_MODULE_0___default.a.PureComp
|
|||||||
value: this.state.groupId,
|
value: this.state.groupId,
|
||||||
onChange: this.handleChange,
|
onChange: this.handleChange,
|
||||||
onKeyPress: this.handleKeyPress,
|
onKeyPress: this.handleKeyPress,
|
||||||
required: true
|
required: true,
|
||||||
|
autoFocus: true
|
||||||
}))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
}))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
||||||
className: "dialog-buttons"
|
className: "dialog-buttons"
|
||||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", {
|
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", {
|
||||||
|
|||||||
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
+16
-5
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user