don't insert posts to timelines when editing a post
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
52278ce519
commit
1c91850181
|
@ -68,7 +68,7 @@ const createStatus = (params: Record<string, any>, idempotencyKey: string, statu
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch(importFetchedStatus(status, idempotencyKey));
|
dispatch(importFetchedStatus(status, idempotencyKey));
|
||||||
dispatch({ type: STATUS_CREATE_SUCCESS, status, params, idempotencyKey });
|
dispatch({ type: STATUS_CREATE_SUCCESS, status, params, idempotencyKey, editing: !!statusId });
|
||||||
|
|
||||||
// Poll the backend for the updated card
|
// Poll the backend for the updated card
|
||||||
if (status.expectsCard) {
|
if (status.expectsCard) {
|
||||||
|
|
|
@ -314,7 +314,7 @@ export default function timelines(state: State = initialState, action: AnyAction
|
||||||
if (action.params.scheduled_at) return state;
|
if (action.params.scheduled_at) return state;
|
||||||
return importPendingStatus(state, action.params, action.idempotencyKey);
|
return importPendingStatus(state, action.params, action.idempotencyKey);
|
||||||
case STATUS_CREATE_SUCCESS:
|
case STATUS_CREATE_SUCCESS:
|
||||||
if (action.status.scheduled_at) return state;
|
if (action.status.scheduled_at || action.editing) return state;
|
||||||
return importStatus(state, action.status, action.idempotencyKey);
|
return importStatus(state, action.status, action.idempotencyKey);
|
||||||
case TIMELINE_EXPAND_REQUEST:
|
case TIMELINE_EXPAND_REQUEST:
|
||||||
return setLoading(state, action.timeline, true);
|
return setLoading(state, action.timeline, true);
|
||||||
|
|
Loading…
Reference in New Issue