Final fixes for moving unread handling to client (#5392)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
892f8f4651
Коммит
06f89cea30
@@ -10,6 +10,7 @@ import UserStore from 'stores/user_store.jsx';
|
||||
var Utils;
|
||||
import {ActionTypes, Constants} from 'utils/constants.jsx';
|
||||
const NotificationPrefs = Constants.NotificationPrefs;
|
||||
const PostTypes = Constants.PostTypes;
|
||||
|
||||
const CHANGE_EVENT = 'change';
|
||||
const STATS_EVENT = 'stats';
|
||||
@@ -500,6 +501,10 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => {
|
||||
break;
|
||||
|
||||
case ActionTypes.RECEIVED_POST:
|
||||
if (action.post.type === PostTypes.JOIN_LEAVE || action.post.type === PostTypes.JOIN_CHANNEL || action.post.type === PostTypes.LEAVE_CHANNEL) {
|
||||
return;
|
||||
}
|
||||
|
||||
var id = action.post.channel_id;
|
||||
var teamId = action.websocketMessageProps ? action.websocketMessageProps.team_id : null;
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import ChannelStore from 'stores/channel_store.jsx';
|
||||
|
||||
import Constants from 'utils/constants.jsx';
|
||||
const NotificationPrefs = Constants.NotificationPrefs;
|
||||
const PostTypes = Constants.PostTypes;
|
||||
|
||||
import {getSiteURL} from 'utils/url.jsx';
|
||||
const ActionTypes = Constants.ActionTypes;
|
||||
|
||||
@@ -395,6 +397,10 @@ TeamStore.dispatchToken = AppDispatcher.register((payload) => {
|
||||
}
|
||||
break;
|
||||
case ActionTypes.RECEIVED_POST:
|
||||
if (action.post.type === PostTypes.JOIN_LEAVE || action.post.type === PostTypes.JOIN_CHANNEL || action.post.type === PostTypes.LEAVE_CHANNEL) {
|
||||
return;
|
||||
}
|
||||
|
||||
var id = action.websocketMessageProps ? action.websocketMessageProps.team_id : '';
|
||||
if (TeamStore.getCurrentId() !== id && id.length > 0) {
|
||||
TeamStore.incrementMessages(id, action.post.channel_id);
|
||||
|
||||
Ссылка в новой задаче
Block a user