fix: if isFetching IGC, don't call getLanguageHelp again in message send function (#1361)

This commit is contained in:
ggurdin 2025-01-06 11:47:07 -05:00 committed by GitHub
parent 3fe673160e
commit 0e312417d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -77,6 +77,11 @@ class Choreographer {
void send(BuildContext context) {
debugPrint("can send message: $canSendMessage");
// if isFetching, already called to getLanguageHelp and hasn't completed yet
// could happen if user clicked send button multiple times in a row
if (isFetching) return;
if (igc.igcTextData != null && igc.igcTextData!.matches.isNotEmpty) {
igc.showFirstMatch(context);
return;