From 9af29d1d0c854908b316f69902d4bdbc2b754c52 Mon Sep 17 00:00:00 2001 From: ggurdin Date: Wed, 30 Oct 2024 15:06:37 -0400 Subject: [PATCH] start language assistance on enter --- lib/pages/chat/chat_input_row.dart | 10 +++++----- .../choreographer/controllers/choreographer.dart | 7 ++++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/pages/chat/chat_input_row.dart b/lib/pages/chat/chat_input_row.dart index 57360d25d..b135f9b58 100644 --- a/lib/pages/chat/chat_input_row.dart +++ b/lib/pages/chat/chat_input_row.dart @@ -1,5 +1,4 @@ import 'package:animations/animations.dart'; -import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/pangea/choreographer/widgets/send_button.dart'; import 'package:fluffychat/pangea/constants/language_constants.dart'; import 'package:fluffychat/utils/platform_infos.dart'; @@ -299,11 +298,12 @@ class ChatInputRow extends StatelessWidget { maxLines: 8, autofocus: !PlatformInfos.isMobile, keyboardType: TextInputType.multiline, - textInputAction: AppConfig.sendOnEnter == true && - PlatformInfos.isMobile - ? TextInputAction.send - : null, // #Pangea + // textInputAction: AppConfig.sendOnEnter == true && + // PlatformInfos.isMobile + // ? TextInputAction.send + // : null, + textInputAction: TextInputAction.send, // onSubmitted: controller.onInputBarSubmitted, onSubmitted: (String value) => controller.onInputBarSubmitted(value, context), diff --git a/lib/pangea/choreographer/controllers/choreographer.dart b/lib/pangea/choreographer/controllers/choreographer.dart index 6f65ea836..578ffc127 100644 --- a/lib/pangea/choreographer/controllers/choreographer.dart +++ b/lib/pangea/choreographer/controllers/choreographer.dart @@ -68,7 +68,12 @@ class Choreographer { } void send(BuildContext context) { - if (!canSendMessage) return; + if (!canSendMessage) { + if (igc.igcTextData != null) { + igc.showFirstMatch(context); + } + return; + } if (pangeaController.subscriptionController.subscriptionStatus == SubscriptionStatus.showPaywall) {