chore(common/models): Merge branch 'feat/common/models/model-dependent-revert-annotation' into feat/common/models/acceptance-context-tracking

This commit is contained in:
jahorton 2020-10-08 15:15:01 +07:00
commit 505b5239c1
3 changed files with 5 additions and 5 deletions

View file

@ -186,7 +186,7 @@ namespace com.keyman.text.prediction {
return this.predict_internal(transcription);
}
public applySuggestion(suggestion: Suggestion, outputTarget: OutputTarget): Promise<Suggestion> {
public applySuggestion(suggestion: Suggestion, outputTarget: OutputTarget): Promise<Reversion> {
if(!outputTarget) {
throw "Accepting suggestions requires a destination OutputTarget instance."
}

View file

@ -341,7 +341,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
};

View file

@ -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<Suggestion> {
public apply(target?: text.OutputTarget): Promise<Reversion> {
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<Suggestion>;
private revertAcceptancePromise: Promise<Reversion>;
private preAccept: text.Transcription = null;
private swallowPrediction: boolean = false;