diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-12-21 16:35:01 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-12-21 16:35:01 -0500 |
commit | ba6e370ca71abacaa30234cb164427d27c86df13 (patch) | |
tree | 2379b6dab897deef1226f66772b8f05e0bb08f9c /webapp/components/needs_team.jsx | |
parent | 139cb52c99ac525f44a280803447bbbd88369f23 (diff) | |
download | chat-ba6e370ca71abacaa30234cb164427d27c86df13.tar.gz chat-ba6e370ca71abacaa30234cb164427d27c86df13.tar.bz2 chat-ba6e370ca71abacaa30234cb164427d27c86df13.zip |
PLT-5012 Combine updateLastViewedAt, setLastViewedAt and setActiveChannel into a single API (#4840)
* Combine updateLastViewedAt, setLastViewedAt and setActiveChannel into a single API
* Remove preference DB writes
Diffstat (limited to 'webapp/components/needs_team.jsx')
-rw-r--r-- | webapp/components/needs_team.jsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/webapp/components/needs_team.jsx b/webapp/components/needs_team.jsx index f90297065..0b91814c3 100644 --- a/webapp/components/needs_team.jsx +++ b/webapp/components/needs_team.jsx @@ -94,7 +94,7 @@ export default class NeedsTeam extends React.Component { // Set up tracking for whether the window is active window.isActive = true; $(window).on('focus', () => { - AsyncClient.updateLastViewedAt(); + AsyncClient.viewChannel(); ChannelStore.resetCounts(ChannelStore.getCurrentId()); ChannelStore.emitChange(); window.isActive = true; @@ -103,7 +103,7 @@ export default class NeedsTeam extends React.Component { $(window).on('blur', () => { window.isActive = false; if (UserStore.getCurrentUser()) { - AsyncClient.setActiveChannel(''); + AsyncClient.viewChannel(''); } }); |