[RN] Refactor getting the default URL

Move it away from AbstractApp into an auxiliary function. In addition, introduce
a new `getServerURL` function which gets the configured server URL and defaults
to meet.jit.si as before.
This commit is contained in:
Saúl Ibarra Corretgé
2018-07-12 11:28:18 -05:00
committed by Lyubo Marinov
parent 980648df4d
commit 3bfab7718f
9 changed files with 60 additions and 35 deletions
@@ -2,6 +2,7 @@
import { Component } from 'react';
import { getDefaultURL } from '../../app';
import { updateSettings } from '../../base/settings';
/**
@@ -173,7 +174,7 @@ export class AbstractSettingsView extends Component<Props> {
*/
export function _mapStateToProps(state: Object) {
return {
_serverURL: state['features/app'].app._getDefaultURL(),
_serverURL: getDefaultURL(state),
_settings: state['features/base/settings'],
_visible: state['features/settings'].visible
};