From 74d40c7d8fac3ccc263af29c622f4481e18e8c59 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 2 Nov 2022 18:09:39 +0100 Subject: [PATCH] Fix edits not being immediately reflected (#19673) Fixes #19546 --- app/javascript/mastodon/actions/compose.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/actions/compose.js b/app/javascript/mastodon/actions/compose.js index e29b88a50f9..a9b7efc4a3d 100644 --- a/app/javascript/mastodon/actions/compose.js +++ b/app/javascript/mastodon/actions/compose.js @@ -7,7 +7,7 @@ import { tagHistory } from 'mastodon/settings'; import resizeImage from 'mastodon/utils/resize_image'; import { showAlert, showAlertForError } from './alerts'; import { useEmoji } from './emojis'; -import { importFetchedAccounts } from './importer'; +import { importFetchedAccounts, importFetchedStatus } from './importer'; import { openModal } from './modal'; import { updateTimeline } from './timelines'; @@ -194,6 +194,10 @@ export function submitCompose(routerHistory) { } }; + if (statusId) { + dispatch(importFetchedStatus({ ...response.data })); + } + if (statusId === null && response.data.visibility !== 'direct') { insertIfOnline('home'); }