Fixing new messages indicator (#4531)
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
29efeff095
Коммит
ced5f54500
@@ -263,6 +263,12 @@ class ChannelStoreClass extends EventEmitter {
|
||||
});
|
||||
}
|
||||
|
||||
setUnreadCountsByCurrentMembers() {
|
||||
Object.keys(this.myChannelMembers).forEach((key) => {
|
||||
this.setUnreadCountByChannel(this.myChannelMembers[key].channel_id);
|
||||
});
|
||||
}
|
||||
|
||||
setUnreadCountsByChannels(channels) {
|
||||
channels.forEach((c) => {
|
||||
this.setUnreadCountByChannel(c.id);
|
||||
@@ -368,6 +374,15 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => {
|
||||
ChannelStore.setUnreadCountsByMembers(action.members);
|
||||
ChannelStore.emitChange();
|
||||
break;
|
||||
case ActionTypes.RECEIVED_CHANNEL_MEMBER:
|
||||
ChannelStore.storeMyChannelMember(action.member);
|
||||
currentId = ChannelStore.getCurrentId();
|
||||
if (currentId && window.isActive) {
|
||||
ChannelStore.resetCounts(currentId);
|
||||
}
|
||||
ChannelStore.setUnreadCountsByCurrentMembers();
|
||||
ChannelStore.emitChange();
|
||||
break;
|
||||
case ActionTypes.RECEIVED_MORE_CHANNELS:
|
||||
ChannelStore.storeMoreChannels(action.channels);
|
||||
ChannelStore.emitChange();
|
||||
@@ -385,4 +400,4 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => {
|
||||
}
|
||||
});
|
||||
|
||||
export default ChannelStore;
|
||||
export default ChannelStore;
|
||||
|
||||
Ссылка в новой задаче
Block a user