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