fix: on IT closed, only replace source text if IT manually dismissed to prevent race condition with accepted continuance stream for single-span translation (#5510)

This commit is contained in:
ggurdin 2026-01-29 10:20:56 -05:00 committed by GitHub
parent 2fdbce0c6d
commit dc71d1caeb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -372,7 +372,9 @@ class Choreographer extends ChangeNotifier {
}
void _onCloseIT() {
if (currentText.isEmpty && itController.sourceText.value != null) {
if (itController.dismissed &&
currentText.isEmpty &&
itController.sourceText.value != null) {
textController.setSystemText(
itController.sourceText.value!,
EditTypeEnum.itDismissed,