[Glitch] Fix toast saying "published" instead of "saved" after editing post in web UI

Port 71641766f2 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
th-new
Eugen Rochko 2023-08-25 22:03:04 +02:00 committed by Claire
parent 9ac73a1fbf
commit cede2f533c
1 changed files with 2 additions and 1 deletions

View File

@ -91,6 +91,7 @@ const messages = defineMessages({
uploadErrorPoll: { id: 'upload_error.poll', defaultMessage: 'File upload not allowed with polls.' }, uploadErrorPoll: { id: 'upload_error.poll', defaultMessage: 'File upload not allowed with polls.' },
open: { id: 'compose.published.open', defaultMessage: 'Open' }, open: { id: 'compose.published.open', defaultMessage: 'Open' },
published: { id: 'compose.published.body', defaultMessage: 'Post published.' }, published: { id: 'compose.published.body', defaultMessage: 'Post published.' },
saved: { id: 'compose.saved.body', defaultMessage: 'Post saved.' },
}); });
export const ensureComposeIsVisible = (getState, routerHistory) => { export const ensureComposeIsVisible = (getState, routerHistory) => {
@ -278,7 +279,7 @@ export function submitCompose(routerHistory) {
} }
dispatch(showAlert({ dispatch(showAlert({
message: messages.published, message: statusId === null ? messages.published : messages.saved,
action: messages.open, action: messages.open,
dismissAfter: 10000, dismissAfter: 10000,
onClick: () => routerHistory.push(`/@${response.data.account.username}/${response.data.id}`), onClick: () => routerHistory.push(`/@${response.data.account.username}/${response.data.id}`),