relax reconstruction error criteria (#959)

Co-authored-by: ggurdin <46800240+ggurdin@users.noreply.github.com>
pull/1490/head
Wilson 1 year ago committed by GitHub
parent af1561b49f
commit 2ddd07791d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -116,8 +116,10 @@ class Choreographer {
// we've got a rather elaborate method of updating tokens after matches are accepted // we've got a rather elaborate method of updating tokens after matches are accepted
// so we need to check if the reconstructed text matches the current text // so we need to check if the reconstructed text matches the current text
// if not, let's get the tokens again and log an error // if not, let's get the tokens again and log an error
final reconstructedText =
PangeaToken.reconstructText(igc.igcTextData!.tokens);
if (igc.igcTextData?.tokens != null && if (igc.igcTextData?.tokens != null &&
PangeaToken.reconstructText(igc.igcTextData!.tokens) != currentText) { reconstructedText.trim() != currentText.trim()) {
if (kDebugMode) { if (kDebugMode) {
PangeaToken.reconstructText( PangeaToken.reconstructText(
igc.igcTextData!.tokens, igc.igcTextData!.tokens,

@ -160,7 +160,7 @@ class IGCTextData {
newTokens.replaceRange(startIndex, endIndex, replacement.tokens); newTokens.replaceRange(startIndex, endIndex, replacement.tokens);
final String newFullText = PangeaToken.reconstructText(newTokens); final String newFullText = PangeaToken.reconstructText(newTokens);
if (newFullText != originalInput && kDebugMode) { if (newFullText.trim() != originalInput.trim() && kDebugMode) {
PangeaToken.reconstructText(newTokens, debugWalkThrough: true); PangeaToken.reconstructText(newTokens, debugWalkThrough: true);
ErrorHandler.logError( ErrorHandler.logError(
m: "reconstructed text not working", m: "reconstructed text not working",

Loading…
Cancel
Save