Do not focus composer when clicking on tablet bottom bar button
This commit is contained in:
+70
-67
@@ -1,6 +1,7 @@
|
||||
import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:pointer_interceptor/pointer_interceptor.dart';
|
||||
import 'package:scribe/scribe/ai/presentation/widgets/button/ai_assistant_button.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/styles/mobile/tablet_bottom_bar_composer_widget_style.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
@@ -35,77 +36,79 @@ class TabletBottomBarComposerWidget extends StatelessWidget {
|
||||
return Container(
|
||||
padding: TabletBottomBarComposerWidgetStyle.padding,
|
||||
color: TabletBottomBarComposerWidgetStyle.backgroundColor,
|
||||
child: Row(
|
||||
children: [
|
||||
const Spacer(),
|
||||
if (onOpenAiAssistantModal != null)
|
||||
AiAssistantButton(
|
||||
imagePaths: imagePaths,
|
||||
margin: const EdgeInsetsDirectional.only(
|
||||
start: TabletBottomBarComposerWidgetStyle.space,
|
||||
child: PointerInterceptor(
|
||||
child: Row(
|
||||
children: [
|
||||
const Spacer(),
|
||||
if (onOpenAiAssistantModal != null)
|
||||
AiAssistantButton(
|
||||
imagePaths: imagePaths,
|
||||
margin: const EdgeInsetsDirectional.only(
|
||||
start: TabletBottomBarComposerWidgetStyle.space,
|
||||
),
|
||||
onOpenAiAssistantModal: onOpenAiAssistantModal!,
|
||||
),
|
||||
onOpenAiAssistantModal: onOpenAiAssistantModal!,
|
||||
const SizedBox(width: TabletBottomBarComposerWidgetStyle.space),
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: imagePaths.icDeleteMailbox,
|
||||
borderRadius: TabletBottomBarComposerWidgetStyle.iconRadius,
|
||||
padding: TabletBottomBarComposerWidgetStyle.iconPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
tooltipMessage: AppLocalizations.of(context).delete,
|
||||
onTapActionCallback: deleteComposerAction,
|
||||
),
|
||||
const SizedBox(width: TabletBottomBarComposerWidgetStyle.space),
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: imagePaths.icDeleteMailbox,
|
||||
borderRadius: TabletBottomBarComposerWidgetStyle.iconRadius,
|
||||
padding: TabletBottomBarComposerWidgetStyle.iconPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
tooltipMessage: AppLocalizations.of(context).delete,
|
||||
onTapActionCallback: deleteComposerAction,
|
||||
),
|
||||
const SizedBox(width: TabletBottomBarComposerWidgetStyle.space),
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: imagePaths.icMarkAsImportant,
|
||||
borderRadius: TabletBottomBarComposerWidgetStyle.iconRadius,
|
||||
padding: TabletBottomBarComposerWidgetStyle.iconPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
iconColor: isMarkAsImportant
|
||||
const SizedBox(width: TabletBottomBarComposerWidgetStyle.space),
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: imagePaths.icMarkAsImportant,
|
||||
borderRadius: TabletBottomBarComposerWidgetStyle.iconRadius,
|
||||
padding: TabletBottomBarComposerWidgetStyle.iconPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
iconColor: isMarkAsImportant
|
||||
? TabletBottomBarComposerWidgetStyle.selectedIconColor
|
||||
: TabletBottomBarComposerWidgetStyle.iconColor,
|
||||
tooltipMessage: isMarkAsImportant
|
||||
? AppLocalizations.of(context).turnOffMarkAsImportant
|
||||
: AppLocalizations.of(context).turnOnMarkAsImportant,
|
||||
onTapActionCallback: toggleMarkAsImportantAction,
|
||||
),
|
||||
const SizedBox(width: TabletBottomBarComposerWidgetStyle.space),
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: imagePaths.icReadReceipt,
|
||||
borderRadius: TabletBottomBarComposerWidgetStyle.iconRadius,
|
||||
padding: TabletBottomBarComposerWidgetStyle.iconPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
iconColor: hasReadReceipt
|
||||
? TabletBottomBarComposerWidgetStyle.selectedIconColor
|
||||
: TabletBottomBarComposerWidgetStyle.iconColor,
|
||||
tooltipMessage: isMarkAsImportant
|
||||
? AppLocalizations.of(context).turnOffMarkAsImportant
|
||||
: AppLocalizations.of(context).turnOnMarkAsImportant,
|
||||
onTapActionCallback: toggleMarkAsImportantAction,
|
||||
),
|
||||
const SizedBox(width: TabletBottomBarComposerWidgetStyle.space),
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: imagePaths.icReadReceipt,
|
||||
borderRadius: TabletBottomBarComposerWidgetStyle.iconRadius,
|
||||
padding: TabletBottomBarComposerWidgetStyle.iconPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
iconColor: hasReadReceipt
|
||||
? TabletBottomBarComposerWidgetStyle.selectedIconColor
|
||||
: TabletBottomBarComposerWidgetStyle.iconColor,
|
||||
tooltipMessage: hasReadReceipt
|
||||
? AppLocalizations.of(context).turnOffRequestReadReceipt
|
||||
: AppLocalizations.of(context).turnOnRequestReadReceipt,
|
||||
onTapActionCallback: requestReadReceiptAction,
|
||||
),
|
||||
const SizedBox(width: TabletBottomBarComposerWidgetStyle.space),
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: imagePaths.icSaveToDraft,
|
||||
borderRadius: TabletBottomBarComposerWidgetStyle.iconRadius,
|
||||
padding: TabletBottomBarComposerWidgetStyle.iconPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
tooltipMessage: AppLocalizations.of(context).saveAsDraft,
|
||||
onTapActionCallback: saveToDraftAction,
|
||||
),
|
||||
const SizedBox(width: TabletBottomBarComposerWidgetStyle.sendButtonSpace),
|
||||
TMailButtonWidget(
|
||||
text: AppLocalizations.of(context).send,
|
||||
icon: imagePaths.icSend,
|
||||
iconAlignment: TextDirection.rtl,
|
||||
padding: TabletBottomBarComposerWidgetStyle.sendButtonPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
iconSpace: TabletBottomBarComposerWidgetStyle.sendButtonIconSpace,
|
||||
textStyle: TabletBottomBarComposerWidgetStyle.sendButtonTextStyle,
|
||||
backgroundColor: TabletBottomBarComposerWidgetStyle.sendButtonBackgroundColor,
|
||||
borderRadius: TabletBottomBarComposerWidgetStyle.sendButtonRadius,
|
||||
onTapActionCallback: sendMessageAction,
|
||||
)
|
||||
]
|
||||
tooltipMessage: hasReadReceipt
|
||||
? AppLocalizations.of(context).turnOffRequestReadReceipt
|
||||
: AppLocalizations.of(context).turnOnRequestReadReceipt,
|
||||
onTapActionCallback: requestReadReceiptAction,
|
||||
),
|
||||
const SizedBox(width: TabletBottomBarComposerWidgetStyle.space),
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: imagePaths.icSaveToDraft,
|
||||
borderRadius: TabletBottomBarComposerWidgetStyle.iconRadius,
|
||||
padding: TabletBottomBarComposerWidgetStyle.iconPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
tooltipMessage: AppLocalizations.of(context).saveAsDraft,
|
||||
onTapActionCallback: saveToDraftAction,
|
||||
),
|
||||
const SizedBox(width: TabletBottomBarComposerWidgetStyle.sendButtonSpace),
|
||||
TMailButtonWidget(
|
||||
text: AppLocalizations.of(context).send,
|
||||
icon: imagePaths.icSend,
|
||||
iconAlignment: TextDirection.rtl,
|
||||
padding: TabletBottomBarComposerWidgetStyle.sendButtonPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
iconSpace: TabletBottomBarComposerWidgetStyle.sendButtonIconSpace,
|
||||
textStyle: TabletBottomBarComposerWidgetStyle.sendButtonTextStyle,
|
||||
backgroundColor: TabletBottomBarComposerWidgetStyle.sendButtonBackgroundColor,
|
||||
borderRadius: TabletBottomBarComposerWidgetStyle.sendButtonRadius,
|
||||
onTapActionCallback: sendMessageAction,
|
||||
)
|
||||
]
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user