pl-fe: or actually move the link to a toast
Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
parent
79e4087aca
commit
6d103b8916
1 changed files with 1 additions and 4 deletions
|
@ -300,7 +300,7 @@ const handleComposeSubmit = (dispatch: AppDispatch, getState: () => RootState, c
|
||||||
dispatch(insertIntoTagHistory(composeId, data.tags || [], status));
|
dispatch(insertIntoTagHistory(composeId, data.tags || [], status));
|
||||||
toast.success(edit ? messages.editSuccess : messages.success, {
|
toast.success(edit ? messages.editSuccess : messages.success, {
|
||||||
actionLabel: messages.view,
|
actionLabel: messages.view,
|
||||||
actionLink: `/@${data.account.acct}/posts/${data.id}`,
|
actionLink: data.visibility === 'direct' ? '/conversations' : `/@${data.account.acct}/posts/${data.id}`,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
toast.success(messages.scheduledSuccess, {
|
toast.success(messages.scheduledSuccess, {
|
||||||
|
@ -432,9 +432,6 @@ const submitCompose = (composeId: string, opts: SubmitComposeOpts = {}) =>
|
||||||
}
|
}
|
||||||
|
|
||||||
return dispatch(createStatus(params, idempotencyKey, statusId)).then((data) => {
|
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);
|
handleComposeSubmit(dispatch, getState, composeId, data, status, !!statusId);
|
||||||
onSuccess?.();
|
onSuccess?.();
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
|
|
Loading…
Reference in a new issue