summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
authorHyeseong Kim <cometkim.kr@gmail.com>2017-01-04 07:15:16 +0900
committerHarrison Healey <harrisonmhealey@gmail.com>2017-01-03 17:15:16 -0500
commit7ee1fec6bf21ab3fb63740c94cc92c2317a0092e (patch)
tree00673758c436698d77e9f32f0cd8a06cf696c3c4 /webapp/utils
parent3bc7445322623028bad633a58668abe7b3eefe8c (diff)
downloadchat-7ee1fec6bf21ab3fb63740c94cc92c2317a0092e.tar.gz
chat-7ee1fec6bf21ab3fb63740c94cc92c2317a0092e.tar.bz2
chat-7ee1fec6bf21ab3fb63740c94cc92c2317a0092e.zip
Fix isMobileApp() to also apply to Android app (#4892)
* Fix isMobileApp() to also apply to Android app * Add checking agent to LHS download app link
Diffstat (limited to 'webapp/utils')
-rw-r--r--webapp/utils/user_agent.jsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/webapp/utils/user_agent.jsx b/webapp/utils/user_agent.jsx
index f64ea193c..18b20dc76 100644
--- a/webapp/utils/user_agent.jsx
+++ b/webapp/utils/user_agent.jsx
@@ -82,7 +82,7 @@ export function isAndroidWeb() {
// 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() {
- return userAgent.indexOf('iPhone') !== -1 && userAgent.indexOf('Safari') === -1 && userAgent.indexOf('CriOS') === -1;
+ return isMobile() && !isIosWeb() && !isAndroidWeb();
}
// Returns true if and only if the user is using Mattermost from either the mobile app or the web browser on a mobile device.