fixed favoriting from notification column

This commit is contained in:
Henry Jameson 2018-08-16 13:20:29 +03:00
parent ef04a78634
commit e8f7491003

View file

@ -268,8 +268,10 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
const addNewNotifications = (state, { dispatch, notifications, older }) => {
const allStatuses = state.allStatuses
const allStatusesObject = state.allStatusesObject
each(notifications, (notification) => {
const action = notification.notice
mergeOrAdd(allStatuses, allStatusesObject, action)
// Only add a new notification if we don't have one for the same action
if (!find(state.notifications.data, (oldNotification) => oldNotification.action.id === action.id)) {
state.notifications.maxId = Math.max(notification.id, state.notifications.maxId)