summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webapp/components/sidebar_header_dropdown.jsx3
-rw-r--r--webapp/utils/user_agent.jsx2
2 files changed, 3 insertions, 2 deletions
diff --git a/webapp/components/sidebar_header_dropdown.jsx b/webapp/components/sidebar_header_dropdown.jsx
index ad0a6e4c6..826d9a342 100644
--- a/webapp/components/sidebar_header_dropdown.jsx
+++ b/webapp/components/sidebar_header_dropdown.jsx
@@ -3,6 +3,7 @@
import $ from 'jquery';
import ReactDOM from 'react-dom';
+import * as UserAgent from 'utils/user_agent.jsx';
import * as Utils from 'utils/utils.jsx';
import * as GlobalActions from 'actions/global_actions.jsx';
@@ -412,7 +413,7 @@ export default class SidebarHeaderDropdown extends React.Component {
let nativeAppDivider = null;
let nativeAppLink = null;
- if (global.window.mm_config.AppDownloadLink) {
+ if (global.window.mm_config.AppDownloadLink && !UserAgent.isMobileApp()) {
nativeAppDivider = <li className='divider'/>;
nativeAppLink = (
<li>
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.