diff --git a/actions/post_actions.jsx b/actions/post_actions.jsx index dd3aecb9daf2..abe2e8bc3cf4 100644 --- a/actions/post_actions.jsx +++ b/actions/post_actions.jsx @@ -22,6 +22,7 @@ import {getSelectedPostId} from 'selectors/rhs'; import {ActionTypes, Constants} from 'utils/constants.jsx'; import {EMOJI_PATTERN} from 'utils/emoticons.jsx'; +import * as UserAgent from 'utils/user_agent'; const dispatch = store.dispatch; const getState = store.getState; @@ -121,7 +122,12 @@ export async function createPost(post, files, success) { } } - await PostActions.createPost(post, files)(dispatch, getState); + if (UserAgent.isIosClassic()) { + await PostActions.createPostImmediately(post, files)(dispatch, getState); + } else { + await PostActions.createPost(post, files)(dispatch, getState); + } + if (post.root_id) { PostStore.storeCommentDraft(post.root_id, null); } else { diff --git a/package.json b/package.json index 99a334367f97..92e449e6c212 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "localforage-observable": "1.4.0", "marked": "mattermost/marked#802e981ade71149a497cbe79d12b8a3f82f7657e", "match-at": "0.1.1", - "mattermost-redux": "mattermost/mattermost-redux.git#3688abb1a0b820305e371dfda38017b66ccf232e", + "mattermost-redux": "mattermost/mattermost-redux.git#b5ebee257af03af32ec00c6d4d2a442bdf34cb04", "object-assign": "4.1.1", "pdfjs-dist": "2.0.106", "perfect-scrollbar": "0.8.1", diff --git a/utils/user_agent.jsx b/utils/user_agent.jsx index c16d61d4597b..299311167ecb 100644 --- a/utils/user_agent.jsx +++ b/utils/user_agent.jsx @@ -79,6 +79,10 @@ export function isAndroidWeb() { return isAndroidChrome(); } +export function isIosClassic() { + return isMobileApp() && isIos(); +} + // Returns true if and only if the user is using a Mattermost mobile app. This will return false if the user is using the // web browser on a mobile device. export function isMobileApp() { diff --git a/yarn.lock b/yarn.lock index 8e31381105dd..265e90b00e79 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5614,10 +5614,10 @@ math-expression-evaluator@^1.2.14: version "1.2.16" resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.16.tgz#b357fa1ca9faefb8e48d10c14ef2bcb2d9f0a7c9" -mattermost-redux@mattermost/mattermost-redux.git#3688abb1a0b820305e371dfda38017b66ccf232e: +mattermost-redux@mattermost/mattermost-redux.git#b5ebee257af03af32ec00c6d4d2a442bdf34cb04: version "1.1.0" - uid "3688abb1a0b820305e371dfda38017b66ccf232e" - resolved "https://codeload.github.com/mattermost/mattermost-redux/tar.gz/3688abb1a0b820305e371dfda38017b66ccf232e" + uid "b5ebee257af03af32ec00c6d4d2a442bdf34cb04" + resolved "https://codeload.github.com/mattermost/mattermost-redux/tar.gz/b5ebee257af03af32ec00c6d4d2a442bdf34cb04" dependencies: deep-equal "1.0.1" form-data "2.3.1"