From 23550d377e3c21177e1307f6ae43ef9d2ca50322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Mon, 23 Oct 2017 14:18:12 +0200 Subject: [PATCH] feat(dark-theme): fix breakage on mobile e09949be9f4c56af909bb6359a1e1f3f98ea6ef5 introduced the dark theme globally, but it only applies to web, so move the logic to App.web.js --- react/features/app/components/AbstractApp.js | 7 +------ react/features/app/components/App.web.js | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/react/features/app/components/AbstractApp.js b/react/features/app/components/AbstractApp.js index 237950167..d0ad7d73d 100644 --- a/react/features/app/components/AbstractApp.js +++ b/react/features/app/components/AbstractApp.js @@ -4,7 +4,6 @@ import { I18nextProvider } from 'react-i18next'; import { Provider } from 'react-redux'; import { compose, createStore } from 'redux'; import Thunk from 'redux-thunk'; -import { AtlasKitThemeProvider } from '@atlaskit/theme'; import { i18next } from '../../base/i18n'; import { @@ -202,11 +201,7 @@ export class AbstractApp extends Component { return ( - - { - this._createElement(component) - } - + { this._createElement(component) } ); diff --git a/react/features/app/components/App.web.js b/react/features/app/components/App.web.js index 4a0a8f770..5103ba96a 100644 --- a/react/features/app/components/App.web.js +++ b/react/features/app/components/App.web.js @@ -1,3 +1,6 @@ +import { AtlasKitThemeProvider } from '@atlaskit/theme'; +import React from 'react'; + import { getLocationContextRoot } from '../../base/util'; import '../../room-lock'; @@ -37,6 +40,20 @@ export class App extends AbstractApp { }; } + /** + * Overrides the parent method to inject {@link AtlasKitThemeProvider} as + * the top most component. + * + * @override + */ + _createElement(component, props) { + return ( + + { super._createElement(component, props) } + + ); + } + /** * Gets a Location object from the window with information about the current * location of the document.