Redirect on success for standalone compose (#35763)
This commit is contained in:
parent
5f4116a311
commit
1675eab561
5 changed files with 14 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue