This commit is contained in:
Sean Yesmunt 2018-11-20 17:23:11 -05:00
parent 7084c87a02
commit 8bd736850c

View file

@ -52,7 +52,7 @@ export default handleActions(
} }
return { return {
...state, ...state,
...unread, unread: { ...unread },
subscriptions: newSubscriptions, subscriptions: newSubscriptions,
}; };
}, },
@ -61,11 +61,10 @@ export default handleActions(
action: SetSubscriptionLatest action: SetSubscriptionLatest
): SubscriptionState => ({ ): SubscriptionState => ({
...state, ...state,
subscriptions: state.subscriptions.map( subscriptions: state.subscriptions.map(subscription =>
subscription => subscription.channelName === action.data.subscription.channelName
subscription.channelName === action.data.subscription.channelName ? { ...subscription, latest: action.data.uri }
? { ...subscription, latest: action.data.uri } : subscription
: subscription
), ),
}), }),
[ACTIONS.UPDATE_SUBSCRIPTION_UNREADS]: ( [ACTIONS.UPDATE_SUBSCRIPTION_UNREADS]: (