diff options
Diffstat (limited to 'app/assets/javascripts/components/actions')
-rw-r--r-- | app/assets/javascripts/components/actions/compose.jsx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/assets/javascripts/components/actions/compose.jsx b/app/assets/javascripts/components/actions/compose.jsx index b576c7444..228469df1 100644 --- a/app/assets/javascripts/components/actions/compose.jsx +++ b/app/assets/javascripts/components/actions/compose.jsx @@ -1,5 +1,7 @@ import api from '../api' +import { updateTimeline } from './timelines'; + export const COMPOSE_CHANGE = 'COMPOSE_CHANGE'; export const COMPOSE_SUBMIT_REQUEST = 'COMPOSE_SUBMIT_REQUEST'; export const COMPOSE_SUBMIT_SUCCESS = 'COMPOSE_SUBMIT_SUCCESS'; @@ -66,9 +68,13 @@ export function submitComposeRequest() { }; export function submitComposeSuccess(status) { - return { - type: COMPOSE_SUBMIT_SUCCESS, - status: status + return (dispatch, getState) => { + dispatch({ + type: COMPOSE_SUBMIT_SUCCESS, + status: status + }); + + dispatch(updateTimeline('home', status)); }; }; |