diff options
author | pluralcafe-docker <git@plural.cafe> | 2018-11-27 00:54:40 +0000 |
---|---|---|
committer | pluralcafe-docker <git@plural.cafe> | 2018-11-27 00:54:40 +0000 |
commit | 384a602fd4117a73338542c59985f54acf5fb3f8 (patch) | |
tree | 2885959ad124784985daa7709cd645a5a8802a07 /app/javascript/flavours/glitch/reducers/timelines.js | |
parent | 72444f73ef4e04118f9c66b965c3c903cff8ef37 (diff) | |
parent | 6b6e633c095485f95350c4308a942192e5fe8806 (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/javascript/flavours/glitch/reducers/timelines.js')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/timelines.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/reducers/timelines.js b/app/javascript/flavours/glitch/reducers/timelines.js index 19e400b19..844a0580f 100644 --- a/app/javascript/flavours/glitch/reducers/timelines.js +++ b/app/javascript/flavours/glitch/reducers/timelines.js @@ -49,7 +49,7 @@ const expandNormalizedTimeline = (state, timeline, statuses, next, isPartial) => })); }; -const updateTimeline = (state, timeline, status, references) => { +const updateTimeline = (state, timeline, status) => { const top = state.getIn([timeline, 'top']); const ids = state.getIn([timeline, 'items'], ImmutableList()); const includesId = ids.includes(status.get('id')); @@ -64,7 +64,6 @@ const updateTimeline = (state, timeline, status, references) => { return state.update(timeline, initialTimeline, map => map.withMutations(mMap => { if (!top) mMap.set('unread', unread + 1); if (top && ids.size > 40) newIds = newIds.take(20); - if (status.getIn(['reblog', 'id'], null) !== null) newIds = newIds.filterNot(item => references.includes(item)); mMap.set('items', newIds.unshift(status.get('id'))); })); }; @@ -119,7 +118,7 @@ export default function timelines(state = initialState, action) { case TIMELINE_EXPAND_SUCCESS: return expandNormalizedTimeline(state, action.timeline, fromJS(action.statuses), action.next, action.partial); case TIMELINE_UPDATE: - return updateTimeline(state, action.timeline, fromJS(action.status), action.references); + return updateTimeline(state, action.timeline, fromJS(action.status)); case TIMELINE_DELETE: return deleteStatus(state, action.id, action.accountId, action.references, action.reblogOf); case ACCOUNT_BLOCK_SUCCESS: |