diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-05-19 02:51:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-19 02:51:29 +0200 |
commit | 7871d29aff992162d4558e1db25d2f78f65ab38c (patch) | |
tree | d333820c8f199fdf68c57c12cb75a79471436333 /app | |
parent | 0b1f88cfd5fb88b392c7b959467ffdb087868f7d (diff) |
Skip pagination logic for pinned account timelines in reducer (#7540)
Fix #7516
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/reducers/timelines.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/javascript/mastodon/reducers/timelines.js b/app/javascript/mastodon/reducers/timelines.js index b09d78b0f..916a091eb 100644 --- a/app/javascript/mastodon/reducers/timelines.js +++ b/app/javascript/mastodon/reducers/timelines.js @@ -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); |