Commit 85c0394a authored by Jordi Mallach's avatar Jordi Mallach

Complete remove mobile redirection.

The build now fails with the simple, unindented if block.
parent da70116c
......@@ -10,9 +10,7 @@ import FastClick from 'fastclick';
import {Route, Switch, Redirect} from 'react-router-dom';
import {setUrl} from 'mattermost-redux/actions/general';
import {setSystemEmojis} from 'mattermost-redux/actions/emojis';
import {getConfig} from 'mattermost-redux/selectors/entities/general';
import * as UserAgent from 'utils/user_agent.jsx';
import {EmojiIndicesByAlias} from 'utils/emoji.jsx';
import {trackLoadTime} from 'actions/diagnostics_actions.jsx';
import * as GlobalActions from 'actions/global_actions.jsx';
......@@ -197,24 +195,6 @@ export default class Root extends React.Component {
}
loadRecentlyUsedCustomEmojis()(store.dispatch, store.getState);
const iosDownloadLink = getConfig(store.getState()).IosAppDownloadLink;
const androidDownloadLink = getConfig(store.getState()).AndroidAppDownloadLink;
const toResetPasswordScreen = this.props.location.pathname === '/reset_password_complete';
// Remove any redirects - the mobile apps do no work with the instance
// XXX: Should we make this a proper option/toggle somewhere.
if (false) {
// redirect to the mobile landing page if the user hasn't seen it before
if (iosDownloadLink && UserAgent.isIosWeb() && !BrowserStore.hasSeenLandingPage() && !toResetPasswordScreen) {
this.props.history.push('/get_ios_app?redirect_to=' + encodeURIComponent(this.props.location.pathname) + encodeURIComponent(this.props.location.search));
BrowserStore.setLandingPageSeen(true);
} else if (androidDownloadLink && UserAgent.isAndroidWeb() && !BrowserStore.hasSeenLandingPage() && !toResetPasswordScreen) {
this.props.history.push('/get_android_app?redirect_to=' + encodeURIComponent(this.props.location.pathname) + encodeURIComponent(this.props.location.search));
BrowserStore.setLandingPageSeen(true);
}
}
}
redirectIfNecessary = (props) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment