From 4961037dbe0bac9a1939125118929d2d04753edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Thu, 18 Feb 2021 19:16:33 +0100 Subject: [PATCH] Remove setting languages on startup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/vector/index.ts | 5 +---- src/vector/init.tsx | 10 ---------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/vector/index.ts b/src/vector/index.ts index 26414020db..b3e29bc382 100644 --- a/src/vector/index.ts +++ b/src/vector/index.ts @@ -91,7 +91,6 @@ async function start() { loadConfig, loadSkin, loadLanguage, - loadSpellCheckLanguages, loadTheme, loadApp, showError, @@ -135,13 +134,12 @@ async function start() { // Load language after loading config.json so that settingsDefaults.language can be applied const loadLanguagePromise = loadLanguage(); - const loadSpellCheckLanguagesPromise = loadSpellCheckLanguages(); // 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, loadSpellCheckLanguagesPromise); + await settled(loadSkinPromise, loadThemePromise, loadLanguagePromise); let acceptBrowser = supportedBrowser; if (!acceptBrowser && window.localStorage) { @@ -192,7 +190,6 @@ async function start() { await loadSkinPromise; await loadThemePromise; await loadLanguagePromise; - await loadSpellCheckLanguagesPromise; // Finally, load the app. All of the other react-sdk imports are in this file which causes the skinner to // run on the components. diff --git a/src/vector/init.tsx b/src/vector/init.tsx index 94effdaed2..de022622db 100644 --- a/src/vector/init.tsx +++ b/src/vector/init.tsx @@ -115,16 +115,6 @@ export async function loadLanguage() { } } -export async function loadSpellCheckLanguages() { - const langs = SettingsStore.getValue("spell-check-languages", null, false); - - try { - await languageHandler.setSpellCheckLanguages(langs); - } catch (e) { - console.error("Unable to set spell-check language", e); - } -} - 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.