Redirect on success for standalone compose (#35763)

This commit is contained in:
Echo authored and GitHub committed 2025-08-13 13:52:29 +00:00
1 parent 613cbf720c
commit 7cf53dbf63
5 files changed
+14 -6

No files matched your search

+4 -1
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']);
@@ -241,6 +241,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