TF-2945 Apply quick select for read receipt in composer on tablet
This commit is contained in:
+11
-5
@@ -3,24 +3,25 @@ import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/styles/mobile/tablet_bottom_bar_composer_widget_style.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/widgets/web/bottom_bar_composer_widget.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
|
||||
class TabletBottomBarComposerWidget extends StatelessWidget {
|
||||
|
||||
final bool hasReadReceipt;
|
||||
final VoidCallback deleteComposerAction;
|
||||
final VoidCallback saveToDraftAction;
|
||||
final VoidCallback sendMessageAction;
|
||||
final OnRequestReadReceiptAction? requestReadReceiptAction;
|
||||
final VoidCallback requestReadReceiptAction;
|
||||
|
||||
final _imagePaths = Get.find<ImagePaths>();
|
||||
|
||||
TabletBottomBarComposerWidget({
|
||||
super.key,
|
||||
required this.hasReadReceipt,
|
||||
required this.deleteComposerAction,
|
||||
required this.saveToDraftAction,
|
||||
required this.sendMessageAction,
|
||||
this.requestReadReceiptAction,
|
||||
required this.requestReadReceiptAction,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -45,8 +46,13 @@ class TabletBottomBarComposerWidget extends StatelessWidget {
|
||||
borderRadius: TabletBottomBarComposerWidgetStyle.iconRadius,
|
||||
padding: TabletBottomBarComposerWidgetStyle.iconPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
tooltipMessage: AppLocalizations.of(context).requestReadReceipt,
|
||||
onTapActionAtPositionCallback: requestReadReceiptAction,
|
||||
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(
|
||||
|
||||
@@ -5,8 +5,6 @@ import 'package:get/get.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/styles/web/bottom_bar_composer_widget_style.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
|
||||
typedef OnRequestReadReceiptAction = Function(RelativeRect position);
|
||||
|
||||
class BottomBarComposerWidget extends StatelessWidget {
|
||||
|
||||
final bool isCodeViewEnabled;
|
||||
|
||||
Reference in New Issue
Block a user