From 61aed51d15033e1a4642efdfff48602d956ac72f Mon Sep 17 00:00:00 2001 From: ggurdin Date: Wed, 30 Oct 2024 15:11:26 -0400 Subject: [PATCH] always show the choreographer send button --- lib/pages/chat/chat_input_row.dart | 56 +++++++++---------- .../choreographer/widgets/send_button.dart | 6 +- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/lib/pages/chat/chat_input_row.dart b/lib/pages/chat/chat_input_row.dart index b135f9b58..340784455 100644 --- a/lib/pages/chat/chat_input_row.dart +++ b/lib/pages/chat/chat_input_row.dart @@ -336,36 +336,36 @@ class ChatInputRow extends StatelessWidget { height: height, width: height, alignment: Alignment.center, - child: PlatformInfos.platformCanRecord && - controller.sendController.text.isEmpty - ? FloatingActionButton.small( - tooltip: L10n.of(context)!.voiceMessage, - onPressed: controller.voiceMessageAction, - elevation: 0, - heroTag: null, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(height), - ), - backgroundColor: theme.colorScheme.primary, - foregroundColor: theme.colorScheme.onPrimary, - child: const Icon(Icons.mic_none_outlined), - ) - : + child: // #Pangea + // PlatformInfos.platformCanRecord && + // controller.sendController.text.isEmpty + // ? FloatingActionButton.small( + // tooltip: L10n.of(context)!.voiceMessage, + // onPressed: controller.voiceMessageAction, + // elevation: 0, + // heroTag: null, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(height), + // ), + // backgroundColor: theme.colorScheme.primary, + // foregroundColor: theme.colorScheme.onPrimary, + // child: const Icon(Icons.mic_none_outlined), + // ) + // : FloatingActionButton.small( + // tooltip: L10n.of(context)!.send, + // onPressed: controller.send, + // elevation: 0, + // heroTag: null, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(height), + // ), + // backgroundColor: + // theme.colorScheme.onPrimaryContainer, + // foregroundColor: theme.colorScheme.onPrimary, + // child: const Icon(Icons.send_outlined), + // ), ChoreographerSendButton(controller: controller), - // FloatingActionButton.small( - // tooltip: L10n.of(context)!.send, - // onPressed: controller.send, - // elevation: 0, - // heroTag: null, - // shape: RoundedRectangleBorder( - // borderRadius: BorderRadius.circular(height), - // ), - // backgroundColor: - // theme.colorScheme.onPrimaryContainer, - // foregroundColor: theme.colorScheme.onPrimary, - // child: const Icon(Icons.send_outlined), - // ), // Pangea# ), ], diff --git a/lib/pangea/choreographer/widgets/send_button.dart b/lib/pangea/choreographer/widgets/send_button.dart index 6fba75395..159a70ea1 100644 --- a/lib/pangea/choreographer/widgets/send_button.dart +++ b/lib/pangea/choreographer/widgets/send_button.dart @@ -58,8 +58,10 @@ class ChoreographerSendButtonState extends State { onPressed: () { widget.controller.choreographer.canSendMessage ? widget.controller.choreographer.send(context) - : widget.controller.choreographer.igc - .showFirstMatch(context); + : !widget.controller.choreographer.isRunningIT + ? widget.controller.choreographer.igc + .showFirstMatch(context) + : null; }, tooltip: L10n.of(context)!.send, ),