|
|
@ -91,11 +91,11 @@ const expandNormalizedNotifications = (state, notifications, next, isLoadingRece
|
|
|
|
|
|
|
|
|
|
|
|
mutable.update(usePendingItems ? 'pendingItems' : 'items', list => {
|
|
|
|
mutable.update(usePendingItems ? 'pendingItems' : 'items', list => {
|
|
|
|
const lastIndex = 1 + list.findLastIndex(
|
|
|
|
const lastIndex = 1 + list.findLastIndex(
|
|
|
|
item => item !== null && (compareId(item.get('id'), items.last().get('id')) > 0 || item.get('id') === items.last().get('id'))
|
|
|
|
item => item !== null && (compareId(item.get('id'), items.last().get('id')) > 0 || item.get('id') === items.last().get('id')),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
const firstIndex = 1 + list.take(lastIndex).findLastIndex(
|
|
|
|
const firstIndex = 1 + list.take(lastIndex).findLastIndex(
|
|
|
|
item => item !== null && compareId(item.get('id'), items.first().get('id')) > 0
|
|
|
|
item => item !== null && compareId(item.get('id'), items.first().get('id')) > 0,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
return list.take(firstIndex).concat(items, list.skip(lastIndex));
|
|
|
|
return list.take(firstIndex).concat(items, list.skip(lastIndex));
|
|
|
|