diff --git a/index.html b/index.html index ad6a8f68..25a7b93f 100644 --- a/index.html +++ b/index.html @@ -482,7 +482,7 @@ render: function() { return (
@@ -756,20 +756,25 @@ getInitialState: function() { return { tabSelected: "p2p", + searchQuery: '', contactSelected: null }; }, componentWillMount: function() { var fnd = Tinode.getFndTopic(); fnd.onSubsUpdated = this.fndSubsUpdated; - fnd.subscribe() - .then(function() { - fnd.getMeta({sub: {}}); - }); + fnd.onMetaDesc = this.fndMetaDesc; + fnd.subscribe({get: {sub: {}, desc: {}}}); }, componentWillUnmount: function() { var fnd = Tinode.getFndTopic(); fnd.onSubsUpdated = undefined; + fnd.onMetaDesc = undefined; + }, + fndMetaDesc: function(desc) { + if (desc.private) { + this.setState({searchQuery: desc.private.toString()}); + } }, fndSubsUpdated: function() { //console.log(keys); @@ -816,7 +821,9 @@ {this.state.tabSelected === "grp" ?