@@ -54,7 +54,7 @@ const normalizeNotification = (state, notification, usePendingItems) => {
5454 } ) ;
5555} ;
5656
57- const expandNormalizedNotifications = ( state , notifications , next , usePendingItems ) => {
57+ const expandNormalizedNotifications = ( state , notifications , next , isLoadingRecent , usePendingItems ) => {
5858 let items = ImmutableList ( ) ;
5959
6060 notifications . forEach ( ( n , i ) => {
@@ -63,7 +63,7 @@ const expandNormalizedNotifications = (state, notifications, next, usePendingIte
6363
6464 return state . withMutations ( mutable => {
6565 if ( ! items . isEmpty ( ) ) {
66- usePendingItems = usePendingItems || ! mutable . get ( 'top' ) || ! mutable . get ( 'pendingItems' ) . isEmpty ( ) ;
66+ usePendingItems = isLoadingRecent && ( usePendingItems || ! mutable . get ( 'top' ) || ! mutable . get ( 'pendingItems' ) . isEmpty ( ) ) ;
6767
6868 mutable . update ( usePendingItems ? 'pendingItems' : 'items' , list => {
6969 const lastIndex = 1 + list . findLastIndex (
@@ -119,7 +119,7 @@ export default function notifications(state = initialState, action) {
119119 case NOTIFICATIONS_UPDATE :
120120 return normalizeNotification ( state , action . notification , action . usePendingItems ) ;
121121 case NOTIFICATIONS_EXPAND_SUCCESS :
122- return expandNormalizedNotifications ( state , action . notifications , action . next , action . usePendingItems ) ;
122+ return expandNormalizedNotifications ( state , action . notifications , action . next , action . isLoadingRecent , action . usePendingItems ) ;
123123 case ACCOUNT_BLOCK_SUCCESS :
124124 return filterNotifications ( state , [ action . relationship . id ] ) ;
125125 case ACCOUNT_MUTE_SUCCESS :
0 commit comments