From 6d103b8916dc917d8f2659669b5a83e25f679006 Mon Sep 17 00:00:00 2001 From: mkljczk Date: Thu, 5 Dec 2024 14:12:25 +0100 Subject: [PATCH] pl-fe: or actually move the link to a toast Signed-off-by: mkljczk --- packages/pl-fe/src/actions/compose.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/pl-fe/src/actions/compose.ts b/packages/pl-fe/src/actions/compose.ts index f5116a817..85918e0ad 100644 --- a/packages/pl-fe/src/actions/compose.ts +++ b/packages/pl-fe/src/actions/compose.ts @@ -300,7 +300,7 @@ const handleComposeSubmit = (dispatch: AppDispatch, getState: () => RootState, c dispatch(insertIntoTagHistory(composeId, data.tags || [], status)); toast.success(edit ? messages.editSuccess : messages.success, { actionLabel: messages.view, - actionLink: `/@${data.account.acct}/posts/${data.id}`, + actionLink: data.visibility === 'direct' ? '/conversations' : `/@${data.account.acct}/posts/${data.id}`, }); } else { toast.success(messages.scheduledSuccess, { @@ -432,9 +432,6 @@ const submitCompose = (composeId: string, opts: SubmitComposeOpts = {}) => } return dispatch(createStatus(params, idempotencyKey, statusId)).then((data) => { - if (!statusId && !data.in_reply_to_id && data.scheduled_at === null && data.visibility === 'direct' && history) { - history.push('/conversations'); - } handleComposeSubmit(dispatch, getState, composeId, data, status, !!statusId); onSuccess?.(); }).catch((error) => {