Skip to content

Commit

Permalink
Fix edits not being immediately reflected (mastodon#19673)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Nov 2, 2022
1 parent e0eb39d commit 74d40c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/javascript/mastodon/actions/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -194,6 +194,10 @@ export function submitCompose(routerHistory) {
}
};

if (statusId) {
dispatch(importFetchedStatus({ ...response.data }));
}

if (statusId === null && response.data.visibility !== 'direct') {
insertIfOnline('home');
}
Expand Down

0 comments on commit 74d40c7

Please sign in to comment.