Fix edits not being immediately reflected (#19673)

Fixes #19546
lolsob-rspec
Claire 2022-11-02 18:09:39 +01:00 committed by GitHub
parent 208ae8a4e0
commit 2674759f9c
1 changed files with 5 additions and 1 deletions

View File

@ -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');
}