]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Don't remove originals of boosted toots from timeline
authorThibaut Girka <thib@sitedethib.com>
Fri, 9 Nov 2018 14:49:11 +0000 (15:49 +0100)
committerThibG <thib@sitedethib.com>
Fri, 9 Nov 2018 20:57:56 +0000 (21:57 +0100)
Port 2b51b4094c18c56fe8252d90db2b62ef69913fac to glitch-soc

app/javascript/flavours/glitch/reducers/timelines.js

index 19e400b194ba2b67af3a4366bb988927f45bc63e..844a0580f4b9041c37dbb1cf07490fcc9da67699 100644 (file)
@@ -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:
This page took 0.028218 seconds and 3 git commands to generate.