removed logging and renamed a few methods for clarity
This commit is contained in:
+4
-9
@@ -1247,7 +1247,6 @@
|
|||||||
break;
|
break;
|
||||||
default:;
|
default:;
|
||||||
};
|
};
|
||||||
console.log("SidepanelView", this.props.foundContacts);
|
|
||||||
return (
|
return (
|
||||||
<div id="sidepanel" className={this.props.hideSelf ? 'nodisplay' : null}>
|
<div id="sidepanel" className={this.props.hideSelf ? 'nodisplay' : null}>
|
||||||
<SideNavbar state={this.props.state}
|
<SideNavbar state={this.props.state}
|
||||||
@@ -1627,10 +1626,8 @@
|
|||||||
var contactNodes = [];
|
var contactNodes = [];
|
||||||
var instance = this;
|
var instance = this;
|
||||||
var showCheckmark = Array.isArray(this.props.topicSelected);
|
var showCheckmark = Array.isArray(this.props.topicSelected);
|
||||||
console.log("ContactList", this.props.contacts);
|
|
||||||
if (this.props.contacts && this.props.contacts.length > 0) {
|
if (this.props.contacts && this.props.contacts.length > 0) {
|
||||||
this.props.contacts.map(function(c) {
|
this.props.contacts.map(function(c) {
|
||||||
console.log("ContactList", c);
|
|
||||||
var key = c.topic ? c.topic : c.user;
|
var key = c.topic ? c.topic : c.user;
|
||||||
// If filter function is provided, filter out the items
|
// If filter function is provided, filter out the items
|
||||||
// which don't satisfy the condition.
|
// which don't satisfy the condition.
|
||||||
@@ -1847,7 +1844,6 @@
|
|||||||
/* BEGIN Create new topic and invite users or send an invite */
|
/* BEGIN Create new topic and invite users or send an invite */
|
||||||
var NewTopicView = React.createClass({
|
var NewTopicView = React.createClass({
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
console.log("NewTopicView", this.props.foundContacts);
|
|
||||||
return {
|
return {
|
||||||
tabSelected: "p2p",
|
tabSelected: "p2p",
|
||||||
searchQuery: this.props.contactsSearchQuery,
|
searchQuery: this.props.contactsSearchQuery,
|
||||||
@@ -1859,7 +1855,6 @@
|
|||||||
this.props.onInitFind();
|
this.props.onInitFind();
|
||||||
},
|
},
|
||||||
componentWillReceiveProps: function(nextProps) {
|
componentWillReceiveProps: function(nextProps) {
|
||||||
console.log("NewTopicView-new props", nextProps.foundContacts);
|
|
||||||
this.setState({
|
this.setState({
|
||||||
searchQuery: nextProps.contactsSearchQuery,
|
searchQuery: nextProps.contactsSearchQuery,
|
||||||
contactList: nextProps.foundContacts
|
contactList: nextProps.foundContacts
|
||||||
@@ -1874,10 +1869,10 @@
|
|||||||
this.props.onCreateTopic(sel, undefined);
|
this.props.onCreateTopic(sel, undefined);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleGroupSubmit: function(name, dataUrl, priv) {
|
handleNewGroupSubmit: function(name, dataUrl, priv) {
|
||||||
this.props.onCreateTopic(undefined, vcard(name, dataUrl), priv);
|
this.props.onCreateTopic(undefined, vcard(name, dataUrl), priv);
|
||||||
},
|
},
|
||||||
handleGroupSubscribe: function(topicName) {
|
handleGroupByID: function(topicName) {
|
||||||
this.props.onCreateTopic(topicName);
|
this.props.onCreateTopic(topicName);
|
||||||
},
|
},
|
||||||
render: function() {
|
render: function() {
|
||||||
@@ -1895,9 +1890,9 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{this.state.tabSelected === "grp" ?
|
{this.state.tabSelected === "grp" ?
|
||||||
<NewTopicView.Group onSubmit={this.handleGroupSubmit} /> :
|
<NewTopicView.Group onSubmit={this.handleNewGroupSubmit} /> :
|
||||||
this.state.tabSelected === "byId" ?
|
this.state.tabSelected === "byId" ?
|
||||||
<NewTopicView.ById onSubmit={this.handleGroupSubscribe} /> :
|
<NewTopicView.ById onSubmit={this.handleGroupByID} /> :
|
||||||
<div className="flex-column">
|
<div className="flex-column">
|
||||||
<NewTopicView.SearchContacts type="p2p"
|
<NewTopicView.SearchContacts type="p2p"
|
||||||
searchQuery={this.state.searchQuery}
|
searchQuery={this.state.searchQuery}
|
||||||
|
|||||||
Reference in New Issue
Block a user