Do not send push notifications for channels being actively viewed (#3931)

Этот коммит содержится в:
Joram Wilander
2016-09-02 12:50:15 -04:00
коммит произвёл GitHub
родитель eb0111f6bb
Коммит f32eb525f3
20 изменённых файлов: 213 добавлений и 47 удалений

Просмотреть файл

@@ -94,6 +94,7 @@ export default class NeedsTeam extends React.Component {
$(window).on('blur', () => {
window.isActive = false;
AsyncClient.setActiveChannel('');
});
Utils.applyTheme(this.state.theme);

Просмотреть файл

@@ -4,6 +4,7 @@
import PostViewController from './post_view_controller.jsx';
import ChannelStore from 'stores/channel_store.jsx';
import * as AsyncClient from 'utils/async_client.jsx';
import React from 'react';
@@ -28,6 +29,7 @@ export default class PostViewCache extends React.Component {
}
componentWillUnmount() {
AsyncClient.setActiveChannel('');
ChannelStore.removeChangeListener(this.onChannelChange);
}