Skip to content
Snippets Groups Projects
Unverified Commit 7871d29a authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Skip pagination logic for pinned account timelines in reducer (#7540)

Fix #7516
parent 0b1f88cf
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment