Do not send push notifications for channels being actively viewed (#3931)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
eb0111f6bb
Коммит
f32eb525f3
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user