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

pull/1593/head
ggurdin 11 months ago committed by GitHub
parent 3fe673160e
commit 0e312417d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -77,6 +77,11 @@ class Choreographer {
void send(BuildContext context) { void send(BuildContext context) {
debugPrint("can send message: $canSendMessage"); 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) { if (igc.igcTextData != null && igc.igcTextData!.matches.isNotEmpty) {
igc.showFirstMatch(context); igc.showFirstMatch(context);
return; return;

Loading…
Cancel
Save