mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
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);
|
||||
|
||||
// set the platform for react sdk
|
||||
preparePlatform();
|
||||
const platform = PlatformPeg.get();
|
||||
|
||||
// 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.
|
||||
// Our own CSS (which is themed) is imported via separate webpack entry points
|
||||
// in webpack.config.js
|
||||
import {preparePlatform} from "./init";
|
||||
|
||||
require('gfm.css/gfm.css');
|
||||
require('highlight.js/styles/github.css');
|
||||
|
||||
@ -81,7 +83,7 @@ function checkBrowserFeatures() {
|
||||
// try in react but fallback to an `alert`
|
||||
async function start() {
|
||||
// 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" */
|
||||
/* webpackPreload: true */
|
||||
"./init");
|
||||
@ -109,6 +111,9 @@ async function start() {
|
||||
}
|
||||
}
|
||||
|
||||
// set the platform for react sdk
|
||||
preparePlatform();
|
||||
|
||||
await loadSkin();
|
||||
|
||||
let acceptBrowser = checkBrowserFeatures();
|
||||
|
Loading…
Reference in New Issue
Block a user