mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-26 22:36:21 +01:00
Skip pagination logic for pinned account timelines in reducer (#7540)
Fix #7516
This commit is contained in:
parent
0b1f88cfd5
commit
7871d29aff
@ -33,6 +33,11 @@ const expandNormalizedTimeline = (state, timeline, statuses, next, isPartial) =>
|
||||
if (!statuses.isEmpty()) {
|
||||
mMap.update('items', ImmutableList(), oldIds => {
|
||||
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 firstIndex = oldIds.take(lastIndex).findLastIndex(id => id !== null && compareId(id, newIds.first()) > 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user