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
Этот коммит содержится в:
Hyeseong Kim
2017-01-04 07:15:16 +09:00
коммит произвёл Harrison Healey
родитель 3bc7445322
Коммит 7ee1fec6bf
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@@ -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.