From d2f4e9860eddf9233ec73c3ebe1398fcc98e9ba0 Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Thu, 23 Mar 2023 15:24:33 +0700 Subject: [PATCH] chore(web): addresses final PR review concerns --- web/build.sh | 8 +------- web/src/app/webview/src/keymanEngine.ts | 8 +++++++- web/src/engine/main/src/engineConfiguration.ts | 5 +---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/web/build.sh b/web/build.sh index 0d6e8a83d6..124fd24283 100755 --- a/web/build.sh +++ b/web/build.sh @@ -68,13 +68,7 @@ if builder_start_action clean; then builder_finish_action success clean fi -# Do not call child actions for configure - they all do the same thing, and it can take a while. - -if builder_start_action configure; then - verify_npm_setup - - builder_finish_action success configure -fi +builder_run_child_actions configure ## Build actions diff --git a/web/src/app/webview/src/keymanEngine.ts b/web/src/app/webview/src/keymanEngine.ts index 71cccc6e3d..04feb5df30 100644 --- a/web/src/app/webview/src/keymanEngine.ts +++ b/web/src/app/webview/src/keymanEngine.ts @@ -29,7 +29,13 @@ export class KeymanEngine extends KeymanEngineBase) { - let device = new DeviceSpec('native', options.embeddingApp.indexOf('Tablet') >= 0 ? 'tablet' : 'phone', this.config.hostDevice.OS, true); + let device = new DeviceSpec( + 'native', + options.embeddingApp.indexOf('Tablet') >= 0 ? 'tablet' : 'phone', + this.config.hostDevice.OS, + true + ); + this.config.hostDevice = device; super.init({...WebviewInitOptionDefaults, ...options}); diff --git a/web/src/engine/main/src/engineConfiguration.ts b/web/src/engine/main/src/engineConfiguration.ts index 5718b63678..494ff86eaa 100644 --- a/web/src/engine/main/src/engineConfiguration.ts +++ b/web/src/engine/main/src/engineConfiguration.ts @@ -37,9 +37,6 @@ export class EngineConfiguration { this._paths = new PathConfiguration(options, this.sourcePath); if(typeof options.setActiveOnRegister == 'boolean') { this._activateFirstKeyboard = options.setActiveOnRegister; - } else if (typeof options.setActiveOnRegister == 'string') { - let str = options.setActiveOnRegister.toLowerCase(); - this._activateFirstKeyboard = str === 'true'; } else { this._activateFirstKeyboard = true; } @@ -93,7 +90,7 @@ export interface InitOptionSpec extends PathOptionSpec { * Note that keyboards specified locally are synchronously loaded while cloud keyboards are async; as a * result, a locally-specified keyboard will generally be available "sooner", even if added "later". */ - setActiveOnRegister?: string | boolean; // TODO: Convert to boolean. Option loader needs to be able to receive this as a string or boolean + setActiveOnRegister?: boolean; /** * Determines the default text shown on the spacebar. If undefined, uses `LANGUAGE_KEYBOARD`