forked from matrix/element-web
prepare platform earlier
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
0b032d7434
commit
6222546e20
|
@ -144,8 +144,6 @@ export async function loadApp(fragParams: {}, acceptBrowser: boolean) {
|
||||||
|
|
||||||
window.addEventListener('hashchange', onHashChange);
|
window.addEventListener('hashchange', onHashChange);
|
||||||
|
|
||||||
// set the platform for react sdk
|
|
||||||
preparePlatform();
|
|
||||||
const platform = PlatformPeg.get();
|
const platform = PlatformPeg.get();
|
||||||
|
|
||||||
// Load the config from the platform
|
// Load the config from the platform
|
||||||
|
|
|
@ -21,6 +21,8 @@ limitations under the License.
|
||||||
// Require common CSS here; this will make webpack process it into bundle.css.
|
// Require common CSS here; this will make webpack process it into bundle.css.
|
||||||
// Our own CSS (which is themed) is imported via separate webpack entry points
|
// Our own CSS (which is themed) is imported via separate webpack entry points
|
||||||
// in webpack.config.js
|
// in webpack.config.js
|
||||||
|
import {preparePlatform} from "./init";
|
||||||
|
|
||||||
require('gfm.css/gfm.css');
|
require('gfm.css/gfm.css');
|
||||||
require('highlight.js/styles/github.css');
|
require('highlight.js/styles/github.css');
|
||||||
|
|
||||||
|
@ -81,7 +83,7 @@ function checkBrowserFeatures() {
|
||||||
// try in react but fallback to an `alert`
|
// try in react but fallback to an `alert`
|
||||||
async function start() {
|
async function start() {
|
||||||
// load init.ts async so that its code is not executed immediately and we can catch any exceptions
|
// load init.ts async so that its code is not executed immediately and we can catch any exceptions
|
||||||
const {rageshakePromise, loadOlm, loadSkin, loadApp} = await import(
|
const {rageshakePromise, preparePlatform, loadOlm, loadSkin, loadApp} = await import(
|
||||||
/* webpackChunkName: "init" */
|
/* webpackChunkName: "init" */
|
||||||
/* webpackPreload: true */
|
/* webpackPreload: true */
|
||||||
"./init");
|
"./init");
|
||||||
|
@ -109,6 +111,9 @@ async function start() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set the platform for react sdk
|
||||||
|
preparePlatform();
|
||||||
|
|
||||||
await loadSkin();
|
await loadSkin();
|
||||||
|
|
||||||
let acceptBrowser = checkBrowserFeatures();
|
let acceptBrowser = checkBrowserFeatures();
|
||||||
|
|
Loading…
Reference in New Issue