From 0405ef977a3ba37b3da472733e59be6db7bd7b99 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Thu, 3 Nov 2016 19:52:09 +0100
Subject: Aria-labels actually didn't work in React, so removing. Fixing some
 bugs

---
 app/assets/javascripts/components/actions/compose.jsx | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

(limited to 'app/assets/javascripts/components/actions/compose.jsx')

diff --git a/app/assets/javascripts/components/actions/compose.jsx b/app/assets/javascripts/components/actions/compose.jsx
index 228469df1..d343867dd 100644
--- a/app/assets/javascripts/components/actions/compose.jsx
+++ b/app/assets/javascripts/components/actions/compose.jsx
@@ -55,6 +55,7 @@ export function submitCompose() {
       media_ids: getState().getIn(['compose', 'media_attachments']).map(item => item.get('id'))
     }).then(function (response) {
       dispatch(submitComposeSuccess(response.data));
+      dispatch(updateTimeline('home', response.data));
     }).catch(function (error) {
       dispatch(submitComposeFail(error));
     });
@@ -68,13 +69,9 @@ export function submitComposeRequest() {
 };
 
 export function submitComposeSuccess(status) {
-  return (dispatch, getState) => {
-    dispatch({
-      type: COMPOSE_SUBMIT_SUCCESS,
-      status: status
-    });
-
-    dispatch(updateTimeline('home', status));
+  return {
+    type: COMPOSE_SUBMIT_SUCCESS,
+    status: status
   };
 };
 
-- 
cgit 

