Do not display AI scribe if AI is not enabled in env.file
This commit is contained in:
@@ -470,8 +470,8 @@ class ComposerView extends GetWidget<ComposerController> {
|
||||
sendMessageAction: () => controller.handleClickSendButton(context),
|
||||
requestReadReceiptAction: () => controller.toggleRequestReadReceipt(context),
|
||||
toggleMarkAsImportantAction: () => controller.toggleMarkAsImportant(context),
|
||||
onOpenAIScribe: () => controller.showAIScribeMenuForFullText(context),
|
||||
aiScribeButtonKey: controller.aiScribeButtonKey,
|
||||
onOpenAIScribe: AIConfig.isAiEnabled ? () => controller.showAIScribeMenuForFullText(context) : null,
|
||||
aiScribeButtonKey: AIConfig.isAiEnabled ? controller.aiScribeButtonKey : null,
|
||||
)),
|
||||
]
|
||||
)
|
||||
@@ -556,6 +556,10 @@ class ComposerView extends GetWidget<ComposerController> {
|
||||
}
|
||||
|
||||
Widget _buildAIScribeSelectionButton(BuildContext context) {
|
||||
if (!AIConfig.isAiEnabled) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return Obx(() {
|
||||
if (controller.hasTextSelection.value &&
|
||||
controller.textSelectionCoordinates.value != null) {
|
||||
|
||||
Reference in New Issue
Block a user