Merge branch 'editing-timeline-insert' into 'develop'

don't insert posts to timelines when editing a post

Closes #1300

See merge request soapbox-pub/soapbox!2128
renovate/major-react-monorepo^2
marcin mikołajczak 2023-01-07 16:07:20 +00:00
commit c2e2c59d96
3 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Search: fixes an abort error when using the navbar search component.
- Posts: fix monospace font in Markdown code blocks.
- Modals: fix action buttons overflow
- Editing: don't insert edited posts to the top of the feed.
## [3.0.0] - 2022-12-25

Wyświetl plik

@ -68,7 +68,7 @@ const createStatus = (params: Record<string, any>, idempotencyKey: string, statu
}
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
if (status.expectsCard) {

Wyświetl plik

@ -314,7 +314,7 @@ export default function timelines(state: State = initialState, action: AnyAction
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;
if (action.status.scheduled_at || action.editing) return state;
return importStatus(state, action.status, action.idempotencyKey);
case TIMELINE_EXPAND_REQUEST:
return setLoading(state, action.timeline, true);