diff options
author | ThibG <thib@sitedethib.com> | 2019-06-07 22:15:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-07 22:15:44 +0200 |
commit | 11c28abcfebcf8827f99a86540076347f1a1edff (patch) | |
tree | b5d615001967cf102e88fac86b8ddb3227600109 /app/javascript/flavours/glitch/reducers/timelines.js | |
parent | 83600198961cce9bfe82cf0f0c33286703bc86d1 (diff) | |
parent | aec3fa35fda50e7f618dcf8b8f14e78a995583f4 (diff) |
Merge pull request #1097 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/reducers/timelines.js')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/timelines.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/reducers/timelines.js b/app/javascript/flavours/glitch/reducers/timelines.js index cb233de1c..440b370e6 100644 --- a/app/javascript/flavours/glitch/reducers/timelines.js +++ b/app/javascript/flavours/glitch/reducers/timelines.js @@ -35,7 +35,9 @@ const expandNormalizedTimeline = (state, timeline, statuses, next, isPartial, is if (!next && !isLoadingRecent) mMap.set('hasMore', false); - if (!statuses.isEmpty()) { + if (timeline.endsWith(':pinned')) { + mMap.set('items', statuses.map(status => status.get('id'))); + } else if (!statuses.isEmpty()) { mMap.update('items', ImmutableList(), oldIds => { const newIds = statuses.map(status => status.get('id')); const lastIndex = oldIds.findLastIndex(id => id !== null && compareId(id, newIds.last()) >= 0) + 1; |