about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsdukhovni <dukhovni@mit.edu>2017-11-24 08:43:53 -0500
committerEugen Rochko <eugen@zeonfederated.com>2017-11-24 14:43:53 +0100
commit2b51b4094c18c56fe8252d90db2b62ef69913fac (patch)
treea6d6c71a7e6996da4b91201fa2eeebb862e9857b
parent1104ac35d35284cbfaac704c6b015ca0e910fbde (diff)
Don't remove originals of boosted toots from timeline (#5479)
* Don't remove originals of boosted toots from timeline

* Remove unused argument to updateTimeline
-rw-r--r--app/javascript/mastodon/reducers/timelines.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/javascript/mastodon/reducers/timelines.js b/app/javascript/mastodon/reducers/timelines.js
index bee4c4ef9..9984c3b5d 100644
--- a/app/javascript/mastodon/reducers/timelines.js
+++ b/app/javascript/mastodon/reducers/timelines.js
@@ -55,7 +55,7 @@ const appendNormalizedTimeline = (state, timeline, statuses, next) => {
   }));
 };
 
-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'));
@@ -70,7 +70,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')));
   }));
 };
@@ -129,7 +128,7 @@ export default function timelines(state = initialState, action) {
   case TIMELINE_EXPAND_SUCCESS:
     return appendNormalizedTimeline(state, action.timeline, fromJS(action.statuses), action.next);
   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: