mirror of
https://github.com/vector-im/element-web.git
synced 2024-09-09 22:55:12 +00:00
Step 4: Disable/remove bulk of skinner code
This commit is contained in:
parent
585c777878
commit
384903361d
3 changed files with 2 additions and 26 deletions
|
@ -110,7 +110,6 @@ async function start() {
|
|||
preparePlatform,
|
||||
loadOlm,
|
||||
loadConfig,
|
||||
loadSkin,
|
||||
loadLanguage,
|
||||
loadTheme,
|
||||
loadApp,
|
||||
|
@ -160,10 +159,9 @@ async function start() {
|
|||
const loadLanguagePromise = loadLanguage();
|
||||
// as quickly as we possibly can, set a default theme...
|
||||
const loadThemePromise = loadTheme();
|
||||
const loadSkinPromise = loadSkin();
|
||||
|
||||
// await things settling so that any errors we have to render have features like i18n running
|
||||
await settled(loadSkinPromise, loadThemePromise, loadLanguagePromise);
|
||||
await settled(loadThemePromise, loadLanguagePromise);
|
||||
|
||||
let acceptBrowser = supportedBrowser;
|
||||
if (!acceptBrowser && window.localStorage) {
|
||||
|
@ -211,7 +209,6 @@ async function start() {
|
|||
// assert things started successfully
|
||||
// ##################################
|
||||
await loadOlmPromise;
|
||||
await loadSkinPromise;
|
||||
await loadThemePromise;
|
||||
await loadLanguagePromise;
|
||||
|
||||
|
|
|
@ -127,27 +127,6 @@ export async function loadLanguage() {
|
|||
}
|
||||
}
|
||||
|
||||
export async function loadSkin() {
|
||||
// Ensure the skin is the very first thing to load for the react-sdk. We don't even want to reference
|
||||
// the SDK until we have to in imports.
|
||||
logger.log("Loading skin...");
|
||||
// load these async so that its code is not executed immediately and we can catch any exceptions
|
||||
const [sdk, skin] = await Promise.all([
|
||||
import(
|
||||
/* webpackChunkName: "matrix-react-sdk" */
|
||||
/* webpackPreload: true */
|
||||
"matrix-react-sdk"),
|
||||
import(
|
||||
/* webpackChunkName: "element-web-component-index" */
|
||||
/* webpackPreload: true */
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore - this module is generated so may fail lint
|
||||
"../component-index"),
|
||||
]);
|
||||
sdk.loadSkin(skin);
|
||||
logger.log("Skin loaded!");
|
||||
}
|
||||
|
||||
export async function loadTheme() {
|
||||
setTheme();
|
||||
}
|
||||
|
|
|
@ -6,4 +6,4 @@
|
|||
|
||||
import * as sdk from "matrix-react-sdk";
|
||||
import * as skin from "../src/component-index";
|
||||
sdk.loadSkin(skin);
|
||||
// sdk.loadSkin(skin);
|
||||
|
|
Loading…
Reference in a new issue