From 8114f7ed95b4bea698eea436d00bf5e60fe9e7fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 8 Jan 2022 13:28:33 +0100 Subject: [PATCH] Do not insert pending statuses for scheduled statuses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/reducers/timelines.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/soapbox/reducers/timelines.js b/app/soapbox/reducers/timelines.js index 616152248..b9b633b50 100644 --- a/app/soapbox/reducers/timelines.js +++ b/app/soapbox/reducers/timelines.js @@ -300,8 +300,10 @@ const handleExpandFail = (state, timelineId) => { export default function timelines(state = initialState, action) { switch(action.type) { case STATUS_CREATE_REQUEST: + if (action.params.scheduled_at) return state; return importPendingStatus(state, action.params, action.idempotencyKey); case STATUS_CREATE_SUCCESS: + if (action.status.scheduled_at) return state; return importStatus(state, action.status, action.idempotencyKey); case TIMELINE_EXPAND_REQUEST: return setLoading(state, action.timeline, true);