making topic sach work
This commit is contained in:
+6
-2
@@ -1247,6 +1247,7 @@
|
||||
break;
|
||||
default:;
|
||||
};
|
||||
console.log("SidepanelView", this.props.foundContacts);
|
||||
return (
|
||||
<div id="sidepanel" className={this.props.hideSelf ? 'nodisplay' : null}>
|
||||
<SideNavbar state={this.props.state}
|
||||
@@ -1626,9 +1627,10 @@
|
||||
var contactNodes = [];
|
||||
var instance = this;
|
||||
var showCheckmark = Array.isArray(this.props.topicSelected);
|
||||
|
||||
console.log("ContactList", this.props.contacts);
|
||||
if (this.props.contacts && this.props.contacts.length > 0) {
|
||||
this.props.contacts.map(function(c) {
|
||||
console.log("ContactList", c);
|
||||
var key = c.topic ? c.topic : c.user;
|
||||
// If filter function is provided, filter out the items
|
||||
// which don't satisfy the condition.
|
||||
@@ -1845,6 +1847,7 @@
|
||||
/* BEGIN Create new topic and invite users or send an invite */
|
||||
var NewTopicView = React.createClass({
|
||||
getInitialState: function() {
|
||||
console.log("NewTopicView", this.props.foundContacts);
|
||||
return {
|
||||
tabSelected: "p2p",
|
||||
searchQuery: this.props.contactsSearchQuery,
|
||||
@@ -1856,6 +1859,7 @@
|
||||
this.props.onInitFind();
|
||||
},
|
||||
componentWillReceiveProps: function(nextProps) {
|
||||
console.log("NewTopicView-new props", nextProps.foundContacts);
|
||||
this.setState({
|
||||
searchQuery: nextProps.contactsSearchQuery,
|
||||
contactList: nextProps.foundContacts
|
||||
@@ -3444,7 +3448,7 @@
|
||||
tnFndSubsUpdated: function() {
|
||||
var contacts = [];
|
||||
// Don't attempt to create P2P topics which already exist. Server will reject the duplicates.
|
||||
Tinode.getFndTopic().subscribers(function(s) {
|
||||
Tinode.getFndTopic().contacts(function(s) {
|
||||
contacts.push(s);
|
||||
});
|
||||
this.setState({foundContacts: contacts});
|
||||
|
||||
Reference in New Issue
Block a user