fix: don't show language mismatch warning popup if activity lang matches L1 (#4269)

This commit is contained in:
ggurdin 2025-10-07 13:56:04 -04:00 committed by GitHub
parent 2c3a19bb67
commit b06b1ff16c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2165,9 +2165,14 @@ class ChatController extends State<ChatPageWithRoom>
return false;
}
final l1 = choreographer.l1Lang?.langCodeShort;
final l2 = choreographer.l2Lang?.langCodeShort;
final activityLang = room.activityPlan?.req.targetLanguage.split('-').first;
return activityLang != null && l2 != null && l2 != activityLang;
return activityLang != null &&
l2 != null &&
l2 != activityLang &&
l1 != activityLang;
}
Future<void> showLanguageMismatchPopup() async {