From ebd9cb7df0e0e3a4fc2715068565769a1ba7e33c Mon Sep 17 00:00:00 2001 From: jahorton Date: Thu, 8 Oct 2020 10:16:56 +0700 Subject: [PATCH 1/2] fix(common/models): suggestion annotation quote defaults --- common/predictive-text/worker/model-compositor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/predictive-text/worker/model-compositor.ts b/common/predictive-text/worker/model-compositor.ts index deb6dc8517..0e46b9e4e2 100644 --- a/common/predictive-text/worker/model-compositor.ts +++ b/common/predictive-text/worker/model-compositor.ts @@ -330,7 +330,7 @@ class ModelCompositor { return { transform: suggestion.transform, transformId: suggestion.transformId, - displayAs: QuoteBehavior.apply(quoteBehavior, suggestion.displayAs, this.punctuation, QuoteBehavior.useQuotes), + displayAs: QuoteBehavior.apply(quoteBehavior, suggestion.displayAs, this.punctuation, defaultQuoteBehavior), tag: annotationType, p: suggestion.p }; From 7d9d6c0d3f6d9df265515143b714c420dfa7b795 Mon Sep 17 00:00:00 2001 From: jahorton Date: Thu, 8 Oct 2020 15:13:59 +0700 Subject: [PATCH 2/2] fix(web): more reversion typing --- .../src/text/prediction/languageProcessor.ts | 2 +- web/source/osk/banner.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/core/web/input-processor/src/text/prediction/languageProcessor.ts b/common/core/web/input-processor/src/text/prediction/languageProcessor.ts index dfd404404b..b02384eab2 100644 --- a/common/core/web/input-processor/src/text/prediction/languageProcessor.ts +++ b/common/core/web/input-processor/src/text/prediction/languageProcessor.ts @@ -186,7 +186,7 @@ namespace com.keyman.text.prediction { return this.predict_internal(transcription); } - public applySuggestion(suggestion: Suggestion, outputTarget: OutputTarget): Promise { + public applySuggestion(suggestion: Suggestion, outputTarget: OutputTarget): Promise { if(!outputTarget) { throw "Accepting suggestions requires a destination OutputTarget instance." } diff --git a/web/source/osk/banner.ts b/web/source/osk/banner.ts index a1e9252450..c8110840dc 100644 --- a/web/source/osk/banner.ts +++ b/web/source/osk/banner.ts @@ -244,7 +244,7 @@ namespace com.keyman.osk { * @param target (Optional) The OutputTarget to which the `Suggestion` ought be applied. * Description Applies the predictive `Suggestion` represented by this `BannerSuggestion`. */ - public apply(target?: text.OutputTarget): Promise { + public apply(target?: text.OutputTarget): Promise { let keyman = com.keyman.singleton; if(this.isEmpty()) { @@ -531,13 +531,13 @@ namespace com.keyman.osk { private currentSuggestions: Suggestion[] = []; private keepSuggestion: Suggestion; - private revertSuggestion: Suggestion; + private revertSuggestion: Reversion; private currentTranscriptionID: number; private recentAccept: boolean = false; private recentAccepted: Suggestion; - private revertAcceptancePromise: Promise; + private revertAcceptancePromise: Promise; private preAccept: text.Transcription = null; private swallowPrediction: boolean = false;