Redirect on success for standalone compose (#35763)

This commit is contained in:
Echo 2025-08-13 15:52:29 +02:00 committed by Claire
commit 1675eab561
5 changed files with 14 additions and 6 deletions

View file

@ -183,7 +183,7 @@ export function directCompose(account) {
};
}
export function submitCompose() {
export function submitCompose(successCallback) {
return function (dispatch, getState) {
const status = getState().getIn(['compose', 'text'], '');
const media = getState().getIn(['compose', 'media_attachments']);
@ -239,6 +239,9 @@ export function submitCompose() {
dispatch(insertIntoTagHistory(response.data.tags, status));
dispatch(submitComposeSuccess({ ...response.data }));
if (typeof successCallback === 'function') {
successCallback(response.data);
}
// To make the app more responsive, immediately push the status
// into the columns