From aa8741fff34280e5aa76479d3ddf5c17184cb26a Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 2 Feb 2024 20:29:43 -0800 Subject: [PATCH] th: glitch: compose: remove annoying post published messages --- .../flavours/glitch/actions/compose.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/javascript/flavours/glitch/actions/compose.js b/app/javascript/flavours/glitch/actions/compose.js index 5398fad289..ad9e4c887f 100644 --- a/app/javascript/flavours/glitch/actions/compose.js +++ b/app/javascript/flavours/glitch/actions/compose.js @@ -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)); });