[IMPROVEMENT] Open browser rather than webview on Create Workspace (#1788)

Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Djorkaeff Alexandre 2020-02-28 11:13:36 -03:00 committed by GitHub
parent c583e0c8f5
commit 64002ba149
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { import {
View, Text, Image, TouchableOpacity, BackHandler View, Text, Image, TouchableOpacity, BackHandler, Linking
} from 'react-native'; } from 'react-native';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
@ -10,7 +10,6 @@ import Orientation from 'react-native-orientation-locker';
import { selectServerRequest, serverInitAdd, serverFinishAdd } from '../../actions/server'; import { selectServerRequest, serverInitAdd, serverFinishAdd } from '../../actions/server';
import { appStart as appStartAction } from '../../actions'; import { appStart as appStartAction } from '../../actions';
import I18n from '../../i18n'; import I18n from '../../i18n';
import openLink from '../../utils/openLink';
import Button from './Button'; import Button from './Button';
import styles from './styles'; import styles from './styles';
import { isIOS, isNotch, isTablet } from '../../utils/deviceInfo'; import { isIOS, isNotch, isTablet } from '../../utils/deviceInfo';
@ -105,9 +104,12 @@ class OnboardingView extends React.Component {
this.newServer('https://open.rocket.chat'); this.newServer('https://open.rocket.chat');
} }
createWorkspace = () => { createWorkspace = async() => {
const { theme } = this.props; try {
openLink('https://cloud.rocket.chat/trial', theme); await Linking.openURL('https://cloud.rocket.chat/trial');
} catch {
// do nothing
}
} }
renderClose = () => { renderClose = () => {