diff --git a/CHANGELOG.md b/CHANGELOG.md index 39b5d0f2b4..889eccdbfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/app/soapbox/actions/statuses.ts b/app/soapbox/actions/statuses.ts index f9bfca3b02..047d61d711 100644 --- a/app/soapbox/actions/statuses.ts +++ b/app/soapbox/actions/statuses.ts @@ -68,7 +68,7 @@ const createStatus = (params: Record, 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) { diff --git a/app/soapbox/reducers/timelines.ts b/app/soapbox/reducers/timelines.ts index 8d2b035116..558dae54d0 100644 --- a/app/soapbox/reducers/timelines.ts +++ b/app/soapbox/reducers/timelines.ts @@ -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);