@@ -77,7 +72,6 @@ class WelcomePage extends AbstractWelcomePage {
this._renderMain()
}
-
);
}
@@ -132,19 +126,6 @@ class WelcomePage extends AbstractWelcomePage {
});
}
- /**
- * Overrides the super in order to prevent the dispatching of the Redux
- * action SET_ROOM.
- *
- * @override
- * @protected
- * @returns {null}
- */
- _onJoin() {
- // Don't call the super implementation and thus prevent the dispatching
- // of the Redux action SET_ROOM.
- }
-
/**
* Handles 'keydown' event to initiate joining the room when the
* 'Enter/Return' button is pressed.
diff --git a/react/features/welcome/route.js b/react/features/welcome/route.js
index c5b2d7f29..3e0922448 100644
--- a/react/features/welcome/route.js
+++ b/react/features/welcome/route.js
@@ -1,4 +1,7 @@
+/* global APP */
+
import { RouteRegistry } from '../base/navigator';
+import { generateRoomWithoutSeparator } from '../base/util';
import { WelcomePage } from './components';
@@ -7,5 +10,23 @@ import { WelcomePage } from './components';
*/
RouteRegistry.register({
component: WelcomePage,
+ onEnter,
path: '/'
});
+
+/**
+ * If the Welcome page/screen is disabled, generates a (random) room (name) so
+ * that the Welcome page/screen is skipped and the Conference page/screen is
+ * presented instead.
+ *
+ * @param {Object} nextState - The next Router state.
+ * @param {Function} replace - The function to redirect to another path.
+ * @returns {void}
+ */
+function onEnter(nextState, replace) {
+ if (typeof APP !== 'undefined' && !APP.settings.isWelcomePageEnabled()) {
+ const room = generateRoomWithoutSeparator();
+
+ replace(`/${room}`);
+ }
+}
diff --git a/react/index.native.js b/react/index.native.js
index 7df47f219..1f983045d 100644
--- a/react/index.native.js
+++ b/react/index.native.js
@@ -61,7 +61,9 @@ class Root extends Component {
// XXX Start with an empty URL if getting the initial URL fails;
// otherwise, nothing will be rendered.
- this.setState({ url: null });
+ if (this.state.url !== null) {
+ this.setState({ url: null });
+ }
});
}
diff --git a/react/index.web.js b/react/index.web.js
index 963b02b5a..4a18ed22e 100644
--- a/react/index.web.js
+++ b/react/index.web.js
@@ -1,19 +1,17 @@
+/* global APP */
+
import React from 'react';
import ReactDOM from 'react-dom';
import { browserHistory } from 'react-router';
-import {
- routerMiddleware,
- routerReducer
-} from 'react-router-redux';
+import { routerMiddleware, routerReducer } from 'react-router-redux';
import { compose, createStore } from 'redux';
import Thunk from 'redux-thunk';
import config from './config';
import { App } from './features/app';
-import {
- MiddlewareRegistry,
- ReducerRegistry
-} from './features/base/redux';
+import { MiddlewareRegistry, ReducerRegistry } from './features/base/redux';
+
+const logger = require('jitsi-meet-logger').getLogger(__filename);
// Create combined reducer from all reducers in registry + routerReducer from
// 'react-router-redux' module (stores location updates from history).
@@ -45,10 +43,33 @@ if (typeof window === 'object'
// Create Redux store with our reducer and middleware.
const store = createStore(reducer, middleware);
-// Render the main Component.
-ReactDOM.render(
-