glitch: compose: remove annoying post published messages
ci/woodpecker/push/woodpecker Pipeline was successful Details

Ariadne Conill 2024-02-02 20:29:43 -08:00
parent 243a7d967b
commit a3cebd15da
1 changed files with 10 additions and 6 deletions

View File

@ -301,12 +301,16 @@ export function submitCompose(routerHistory) {
insertIfOnline('direct');
}
dispatch(showAlert({
message: statusId === null ? messages.published : messages.saved,
action: messages.open,
dismissAfter: 10000,
onClick: () => routerHistory.push(`/@${response.data.account.username}/${response.data.id}`),
}));
// Upstream shows a "post published" message every time you post now. This is highly annoying.
// Instead, only display a message if a draft is saved.
if (statusId !== null) {
dispatch(showAlert({
message: messages.saved,
action: messages.open,
dismissAfter: 10000,
onClick: () => routerHistory.push(`/@${response.data.account.username}/${response.data.id}`),
}));
}
}).catch(function (error) {
dispatch(submitComposeFail(error));
});