Switch to the team when notification is clicked

This commit is contained in:
Yuya Ochiai
2015-12-23 17:16:53 +09:00
parent 762c4dbbac
commit 69a1c177a1
2 changed files with 7 additions and 1 deletions

View File

@@ -72,7 +72,10 @@ var MainPage = React.createClass({
var handleUnreadCountChange = function(count) {
thisObj.handleUnreadCountChange(index, count);
};
return (<MattermostView style={ thisObj.visibleStyle(thisObj.state.key === index) } src={ team.url } onUnreadCountChange={ handleUnreadCountChange } />)
var handleNotificationClick = function() {
thisObj.handleSelect(index);
}
return (<MattermostView style={ thisObj.visibleStyle(thisObj.state.key === index) } src={ team.url } onUnreadCountChange={ handleUnreadCountChange } onNotificationClick={ handleNotificationClick } />)
});
return (
<Grid fluid>
@@ -153,6 +156,8 @@ var MattermostView = React.createClass({
var unreadCount = event.args[0];
thisObj.handleUnreadCountChange(unreadCount);
break;
case 'onNotificationClick':
thisObj.props.onNotificationClick();
}
});