fix: when fetching translation, only consider a message to have included IT if the sent message body matches the message at the end of choreo (#3936)
This commit is contained in:
parent
b6e357bf5f
commit
39e01c320b
2 changed files with 7 additions and 2 deletions
|
|
@ -223,6 +223,10 @@ class ChoreoRecord {
|
|||
|
||||
List<ITStep> get itSteps =>
|
||||
choreoSteps.where((e) => e.itStep != null).map((e) => e.itStep!).toList();
|
||||
|
||||
bool endedWithIT(String sent) {
|
||||
return includedIT && stepText() == sent;
|
||||
}
|
||||
}
|
||||
|
||||
/// A new ChoreoRecordStep is saved in the following cases:
|
||||
|
|
|
|||
|
|
@ -590,8 +590,9 @@ class PangeaMessageEvent {
|
|||
throw Exception("Missing language codes");
|
||||
}
|
||||
|
||||
final includedIT = (originalSent?.choreo?.includedIT ?? false) &&
|
||||
!(originalSent?.choreo?.includedIGC ?? true);
|
||||
final includedIT =
|
||||
(originalSent?.choreo?.endedWithIT(originalSent!.text) ?? false) &&
|
||||
!(originalSent?.choreo?.includedIGC ?? true);
|
||||
|
||||
RepresentationEvent? rep;
|
||||
if (!includedIT) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue