This commit is contained in:
@@ -102,22 +102,22 @@ class NewTopicView extends React.Component {
|
||||
{this.state.tabSelected === 'grp' ?
|
||||
<NewTopicGroup onSubmit={this.handleNewGroupSubmit} /> :
|
||||
this.state.tabSelected === 'byid' ?
|
||||
<NewTopicById
|
||||
onSubmit={this.handleGroupByID}
|
||||
onError={this.props.onError} /> :
|
||||
<div className="flex-column">
|
||||
<SearchContacts
|
||||
type="p2p"
|
||||
onSearchContacts={this.handleSearchContacts} />
|
||||
<ContactList
|
||||
contacts={this.props.searchResults}
|
||||
myUserId={this.props.myUserId}
|
||||
emptyListMessage={no_contacts_placeholder}
|
||||
showOnline={false}
|
||||
showUnread={false}
|
||||
showContextMenu={false}
|
||||
onTopicSelected={this.handleContactSelected} />
|
||||
</div>}
|
||||
<NewTopicById
|
||||
onSubmit={this.handleGroupByID}
|
||||
onError={this.props.onError} /> :
|
||||
<div className="flex-column">
|
||||
<SearchContacts
|
||||
type="p2p"
|
||||
onSearchContacts={this.handleSearchContacts} />
|
||||
<ContactList
|
||||
contacts={this.props.searchResults}
|
||||
myUserId={this.props.myUserId}
|
||||
emptyListMessage={no_contacts_placeholder}
|
||||
showOnline={false}
|
||||
showUnread={false}
|
||||
showContextMenu={false}
|
||||
onTopicSelected={this.handleContactSelected} />
|
||||
</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1063,10 +1063,10 @@ class TinodeWeb extends React.Component {
|
||||
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) {
|
||||
// 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);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class NewTopicById extends React.PureComponent {
|
||||
description="Prompt for entering user or group ID">{
|
||||
(prompt) => <input type="text" placeholder={prompt}
|
||||
value={this.state.groupId} onChange={this.handleChange}
|
||||
onKeyPress={this.handleKeyPress} required />
|
||||
onKeyPress={this.handleKeyPress} required autoFocus />
|
||||
}</FormattedMessage>
|
||||
</div>
|
||||
<div className="dialog-buttons">
|
||||
|
||||
Reference in New Issue
Block a user