Fixed bug due to refactoring.

This commit is contained in:
mid0111
2016-01-19 13:15:24 +09:00
parent 9438358817
commit ec9c8ad2cd

View File

@@ -33,7 +33,7 @@ var MainPage = React.createClass({
var webview = document.getElementById('mattermostView' + thisObj.state.key); var webview = document.getElementById('mattermostView' + thisObj.state.key);
webview.focus(); webview.focus();
this.handleOnTeamFocused(key); thisObj.handleOnTeamFocused(thisObj.state.key);
}; };
var currentWindow = remote.getCurrentWindow(); var currentWindow = remote.getCurrentWindow();
@@ -79,7 +79,7 @@ var MainPage = React.createClass({
}, },
handleNotify: function(index) { handleNotify: function(index) {
// Never turn on the unreadAtActive flag at current focused tab. // Never turn on the unreadAtActive flag at current focused tab.
if (state && this.state.key === index && remote.getCurrentWindow().isFocused()) { if (this.state.key === index && remote.getCurrentWindow().isFocused()) {
return; return;
} }
this.handleUnreadAtActiveChange(index, true); this.handleUnreadAtActiveChange(index, true);