fixed favoriting from notification column
This commit is contained in:
parent
ef04a78634
commit
e8f7491003
@ -268,8 +268,10 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
|
|||||||
|
|
||||||
const addNewNotifications = (state, { dispatch, notifications, older }) => {
|
const addNewNotifications = (state, { dispatch, notifications, older }) => {
|
||||||
const allStatuses = state.allStatuses
|
const allStatuses = state.allStatuses
|
||||||
|
const allStatusesObject = state.allStatusesObject
|
||||||
each(notifications, (notification) => {
|
each(notifications, (notification) => {
|
||||||
const action = notification.notice
|
const action = notification.notice
|
||||||
|
mergeOrAdd(allStatuses, allStatusesObject, action)
|
||||||
// Only add a new notification if we don't have one for the same 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)) {
|
if (!find(state.notifications.data, (oldNotification) => oldNotification.action.id === action.id)) {
|
||||||
state.notifications.maxId = Math.max(notification.id, state.notifications.maxId)
|
state.notifications.maxId = Math.max(notification.id, state.notifications.maxId)
|
||||||
|
Loading…
Reference in New Issue
Block a user