From 7ee1fec6bf21ab3fb63740c94cc92c2317a0092e Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Wed, 4 Jan 2017 07:15:16 +0900 Subject: 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 --- webapp/utils/user_agent.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'webapp/utils') 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. -- cgit v1.2.3-1-g7c22