diff options
author | pluralcafe-docker <git@plural.cafe> | 2019-01-04 21:19:55 +0000 |
---|---|---|
committer | pluralcafe-docker <git@plural.cafe> | 2019-01-04 21:19:55 +0000 |
commit | 74134e490c49d8a7d88cc69720e22cd88cee9233 (patch) | |
tree | bd7fc8d41f7887037401ff86c81bc93d5fb00d01 /app/javascript/flavours/glitch/actions/compose.js | |
parent | 797a8429a0deb511e6d6092edad39f856231534e (diff) | |
parent | 0acd51acdc1e670bf57f58671cb8e30743782c63 (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/javascript/flavours/glitch/actions/compose.js')
-rw-r--r-- | app/javascript/flavours/glitch/actions/compose.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/javascript/flavours/glitch/actions/compose.js b/app/javascript/flavours/glitch/actions/compose.js index d53d26924..71d3fb1b2 100644 --- a/app/javascript/flavours/glitch/actions/compose.js +++ b/app/javascript/flavours/glitch/actions/compose.js @@ -142,6 +142,12 @@ export function submitCompose(routerHistory) { 'Idempotency-Key': getState().getIn(['compose', 'idempotencyKey']), }, }).then(function (response) { + if (routerHistory && routerHistory.location.pathname === '/statuses/new' + && window.history.state + && !getState().getIn(['compose', 'advanced_options', 'threaded_mode'])) { + routerHistory.goBack(); + } + dispatch(insertIntoTagHistory(response.data.tags, status)); dispatch(submitComposeSuccess({ ...response.data })); @@ -158,12 +164,6 @@ export function submitCompose(routerHistory) { } }; - if (routerHistory && routerHistory.location.pathname === '/statuses/new' - && window.history.state - && !getState().getIn(['compose', 'advanced_options', 'threaded_mode'])) { - routerHistory.goBack(); - } - insertIfOnline('home'); if (response.data.in_reply_to_id === null && response.data.visibility === 'public') { |