|
|
@ -33,6 +33,11 @@ const expandNormalizedTimeline = (state, timeline, statuses, next, isPartial) =>
|
|
|
|
if (!statuses.isEmpty()) {
|
|
|
|
if (!statuses.isEmpty()) {
|
|
|
|
mMap.update('items', ImmutableList(), oldIds => {
|
|
|
|
mMap.update('items', ImmutableList(), oldIds => {
|
|
|
|
const newIds = statuses.map(status => status.get('id'));
|
|
|
|
const newIds = statuses.map(status => status.get('id'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (timeline.indexOf(':pinned') !== -1) {
|
|
|
|
|
|
|
|
return newIds;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const lastIndex = oldIds.findLastIndex(id => id !== null && compareId(id, newIds.last()) >= 0) + 1;
|
|
|
|
const lastIndex = oldIds.findLastIndex(id => id !== null && compareId(id, newIds.last()) >= 0) + 1;
|
|
|
|
const firstIndex = oldIds.take(lastIndex).findLastIndex(id => id !== null && compareId(id, newIds.first()) > 0);
|
|
|
|
const firstIndex = oldIds.take(lastIndex).findLastIndex(id => id !== null && compareId(id, newIds.first()) > 0);
|
|
|
|
|
|
|
|
|
|
|
|