Prevent unnecessary store emits (#6285)

* Remove unnecessary store emits

* Drastically reduce number of emitted changes
This commit is contained in:
Joram Wilander
2017-05-01 10:49:34 -04:00
committed by GitHub
parent 83f819451a
commit 2d22fb5652
6 changed files with 57 additions and 77 deletions

View File

@@ -119,7 +119,7 @@ export default class NeedsTeam extends React.Component {
window.isActive = true;
$(window).on('focus', () => {
this.props.actions.viewChannel(ChannelStore.getCurrentId());
ChannelStore.resetCounts(ChannelStore.getCurrentId());
ChannelStore.resetCounts([ChannelStore.getCurrentId()]);
ChannelStore.emitChange();
window.isActive = true;