From 1624a95b2b612ff32408f9c991938a0949cd12b3 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Fri, 30 Nov 2018 12:17:56 +0100 Subject: [Glitch] Introduce flat layout to contexts reducer Port 023fe5181b66ba2cbd20cca4e3bd34f132deba52 to glitch-soc --- app/javascript/flavours/glitch/actions/timelines.js | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'app/javascript/flavours/glitch/actions') diff --git a/app/javascript/flavours/glitch/actions/timelines.js b/app/javascript/flavours/glitch/actions/timelines.js index 27ca66e51..ffd259d5f 100644 --- a/app/javascript/flavours/glitch/actions/timelines.js +++ b/app/javascript/flavours/glitch/actions/timelines.js @@ -12,34 +12,13 @@ export const TIMELINE_SCROLL_TOP = 'TIMELINE_SCROLL_TOP'; export const TIMELINE_DISCONNECT = 'TIMELINE_DISCONNECT'; -export const TIMELINE_CONTEXT_UPDATE = 'CONTEXT_UPDATE'; - export function updateTimeline(timeline, status) { return (dispatch, getState) => { - const parents = []; - - if (status.in_reply_to_id) { - let parent = getState().getIn(['statuses', status.in_reply_to_id]); - - while (parent && parent.get('in_reply_to_id')) { - parents.push(parent.get('id')); - parent = getState().getIn(['statuses', parent.get('in_reply_to_id')]); - } - } - dispatch({ type: TIMELINE_UPDATE, timeline, status, }); - - if (parents.length > 0) { - dispatch({ - type: TIMELINE_CONTEXT_UPDATE, - status, - references: parents, - }); - } }; }; -- cgit