diff options
author | Corey Hulen <corey@hulen.com> | 2016-04-26 05:42:39 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-04-26 08:42:39 -0400 |
commit | 88aa2a10b988cb48d45f13ca7a86640e7c7a5d82 (patch) | |
tree | 09b925eee5d7557db12b6317880648939fefb51d /webapp/components | |
parent | 1ac649c4d5c91106799d69e653bf4bf7e4fcf376 (diff) | |
download | chat-88aa2a10b988cb48d45f13ca7a86640e7c7a5d82.tar.gz chat-88aa2a10b988cb48d45f13ca7a86640e7c7a5d82.tar.bz2 chat-88aa2a10b988cb48d45f13ca7a86640e7c7a5d82.zip |
PLT-2676 see if this fixes pre-release (#2799)
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/needs_team.jsx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/webapp/components/needs_team.jsx b/webapp/components/needs_team.jsx index 672787db7..4aea8fe46 100644 --- a/webapp/components/needs_team.jsx +++ b/webapp/components/needs_team.jsx @@ -55,17 +55,19 @@ export default class NeedsTeam extends React.Component { } componentWillMount() { - UserStore.addChangeListener(this.onChanged); - TeamStore.addChangeListener(this.onChanged); - - // Emit view action - GlobalActions.viewLoggedIn(); - // Go to tutorial if we are first arrivign const tutorialStep = PreferenceStore.getInt(Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), 999); if (tutorialStep <= TutorialSteps.INTRO_SCREENS) { browserHistory.push(Utils.getTeamURLNoOriginFromAddressBar() + '/tutorial'); } + } + + componentDidMount() { + UserStore.addChangeListener(this.onChanged); + TeamStore.addChangeListener(this.onChanged); + + // Emit view action + GlobalActions.viewLoggedIn(); // Set up tracking for whether the window is active window.isActive = true; @@ -75,6 +77,7 @@ export default class NeedsTeam extends React.Component { ChannelStore.emitChange(); window.isActive = true; }); + $(window).on('blur', () => { window.isActive = false; }); |