Nick changes get handled properly by the server IRC client, user count stays hidden when the selected tab is not a channel
This commit is contained in:
parent
0a47f2ae4a
commit
e942924c15
5 changed files with 27 additions and 20 deletions
|
@ -26,7 +26,7 @@ var ChatTitle = React.createClass({
|
|||
<div>
|
||||
<span className="chat-title">{tab.name}</span>
|
||||
</div>
|
||||
<span className="chat-usercount">{usercount}</span>
|
||||
<span className="chat-usercount">{usercount || null}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -5,14 +5,10 @@ var selectedTabStore = require('../stores/selectedTab');
|
|||
var tabActions = require('../actions/tab');
|
||||
|
||||
var TabListItem = React.createClass({
|
||||
mixins: [
|
||||
Reflux.connect(selectedTabStore, 'selectedTab')
|
||||
],
|
||||
mixins: [Reflux.connect(selectedTabStore)],
|
||||
|
||||
getInitialState: function() {
|
||||
return {
|
||||
selectedTab: selectedTabStore.getState()
|
||||
};
|
||||
return selectedTabStore.getState();
|
||||
},
|
||||
|
||||
handleClick: function() {
|
||||
|
@ -20,15 +16,14 @@ var TabListItem = React.createClass({
|
|||
},
|
||||
|
||||
render: function() {
|
||||
var selected = this.state.selectedTab;
|
||||
var classes = [];
|
||||
|
||||
if (!this.props.channel) {
|
||||
classes.push('tab-server');
|
||||
}
|
||||
|
||||
if (this.props.server === selected.server &&
|
||||
this.props.channel === selected.channel) {
|
||||
if (this.props.server === this.state.server &&
|
||||
this.props.channel === this.state.channel) {
|
||||
classes.push('selected');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue