From b938a960a266945770b0b3994e8b13222c6bb6f5 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Fri, 22 Jul 2016 12:00:14 -0400 Subject: [PATCH] PLT-3683 Changed Utils.isMobileApp to return false for desktop apps (#3654) --- webapp/utils/utils.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx index a8a93b4525..6139952006 100644 --- a/webapp/utils/utils.jsx +++ b/webapp/utils/utils.jsx @@ -65,11 +65,7 @@ export function isIosChrome() { export function isMobileApp() { const userAgent = navigator.userAgent; - // the mobile app has different user agents for the native api calls and the shim, so handle them both - const isApi = userAgent.indexOf('Mattermost') !== -1; - const isShim = userAgent.indexOf('iPhone') !== -1 && userAgent.indexOf('Safari') === -1 && userAgent.indexOf('Chrome') === -1; - - return isApi || isShim; + return userAgent.indexOf('iPhone') !== -1 && userAgent.indexOf('Safari') === -1 && userAgent.indexOf('CriOS') === -1; } export function isInRole(roles, inRole) {