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:
parent
2fdbce0c6d
commit
dc71d1caeb
1 changed files with 3 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue