From 0e312417d0c206ddc19ba90e54c83d22704c259d Mon Sep 17 00:00:00 2001 From: ggurdin <46800240+ggurdin@users.noreply.github.com> Date: Mon, 6 Jan 2025 11:47:07 -0500 Subject: [PATCH] fix: if isFetching IGC, don't call getLanguageHelp again in message send function (#1361) --- lib/pangea/choreographer/controllers/choreographer.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/pangea/choreographer/controllers/choreographer.dart b/lib/pangea/choreographer/controllers/choreographer.dart index b74c95d03..c86d77139 100644 --- a/lib/pangea/choreographer/controllers/choreographer.dart +++ b/lib/pangea/choreographer/controllers/choreographer.dart @@ -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;