start language assistance on enter

This commit is contained in:
ggurdin 2024-10-30 15:06:37 -04:00
parent e93d643985
commit 9af29d1d0c
No known key found for this signature in database
GPG key ID: A01CB41737CBB478
2 changed files with 11 additions and 6 deletions

View file

@ -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),

View file

@ -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) {