TF-3724 Thread Detail add unread indicator collapsed email
TF-3724 Thread Detail Optimize mark read/star call TF-3724 Thread Detail Organize markCollapsedEmailReadSuccess TF-3724 Thread Detail show toast on mark read fail TF-3724 Thread Detail Update sender, recipient and preview style TF-3724 Thread Detail Revert ThemeUtils changes
This commit is contained in:
@@ -54,7 +54,7 @@ class _EmailReceiverWidgetState extends State<EmailReceiverWidget> {
|
||||
if (PlatformInfo.isWeb) {
|
||||
if (_isDisplayAll) {
|
||||
return Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Container(
|
||||
@@ -147,7 +147,7 @@ class _EmailReceiverWidgetState extends State<EmailReceiverWidget> {
|
||||
} else {
|
||||
if (_isDisplayAll) {
|
||||
return Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Column(
|
||||
@@ -238,8 +238,11 @@ class _EmailReceiverWidgetState extends State<EmailReceiverWidget> {
|
||||
text: index == listEmailAddress.length - 1
|
||||
? emailAddress.asString()
|
||||
: '${emailAddress.asString()},',
|
||||
textStyle: ThemeUtils.textStyleBodyBody1(color: AppColor.steelGray400),
|
||||
padding: const EdgeInsetsDirectional.symmetric(vertical: 5, horizontal: 8),
|
||||
textStyle: ThemeUtils.textStyleHeadingHeadingSmall(
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w400,
|
||||
).copyWith(height: 17),
|
||||
padding: const EdgeInsetsDirectional.symmetric(vertical: 2, horizontal: 8),
|
||||
backgroundColor: Colors.transparent,
|
||||
onTapActionCallback: () => widget.openEmailAddressDetailAction?.call(context, emailAddress),
|
||||
onLongPressActionCallback: () => AppUtils.copyEmailAddressToClipboard(context, emailAddress.emailAddress),
|
||||
|
||||
@@ -41,9 +41,10 @@ class EmailSenderBuilder extends StatelessWidget {
|
||||
},
|
||||
borderRadius: 8,
|
||||
padding: EdgeInsets.zero,
|
||||
customStyle: ThemeUtils.textStyleHeadingHeadingSmall(
|
||||
customStyle: ThemeUtils.textStyleHeadingH6(
|
||||
color: Colors.black,
|
||||
),
|
||||
fontWeight: FontWeight.w500,
|
||||
).copyWith(height: 20),
|
||||
overflow: CommonTextStyle.defaultTextOverFlow,
|
||||
softWrap: CommonTextStyle.defaultSoftWrap
|
||||
),
|
||||
|
||||
+29
-1
@@ -2,7 +2,6 @@ import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:core/presentation/utils/icon_utils.dart';
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
||||
import 'package:core/presentation/views/image/avatar_builder.dart';
|
||||
import 'package:core/utils/platform_info.dart';
|
||||
@@ -41,6 +40,7 @@ class InformationSenderAndReceiverBuilder extends StatelessWidget {
|
||||
final VoidCallback? onToggleThreadDetailCollapseExpand;
|
||||
final OnTapAvatarActionClick? onTapAvatarActionClick;
|
||||
final PresentationMailbox? mailboxContain;
|
||||
final bool showUnreadVisualization;
|
||||
|
||||
const InformationSenderAndReceiverBuilder({
|
||||
Key? key,
|
||||
@@ -59,6 +59,7 @@ class InformationSenderAndReceiverBuilder extends StatelessWidget {
|
||||
this.onToggleThreadDetailCollapseExpand,
|
||||
this.onTapAvatarActionClick,
|
||||
this.mailboxContain,
|
||||
this.showUnreadVisualization = false,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
@@ -81,12 +82,25 @@ class InformationSenderAndReceiverBuilder extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(height: 4),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
if (showUnreadVisualization &&
|
||||
!emailSelected.hasRead &&
|
||||
responsiveUtils.isMobile(context))
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.only(end: 8),
|
||||
child: SvgPicture.asset(
|
||||
imagePaths.icUnreadStatus,
|
||||
width: 9,
|
||||
height: 9,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
if (emailSelected.from?.isNotEmpty == true)
|
||||
Flexible(
|
||||
child: EmailSenderBuilder(
|
||||
@@ -124,6 +138,19 @@ class InformationSenderAndReceiverBuilder extends StatelessWidget {
|
||||
emailSelected: emailSelected,
|
||||
padding: const EdgeInsetsDirectional.only(start: 16, top: 2),
|
||||
),
|
||||
if (showUnreadVisualization &&
|
||||
!emailSelected.hasRead &&
|
||||
!responsiveUtils.isMobile(context))
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: imagePaths.icUnreadStatus,
|
||||
backgroundColor: Colors.transparent,
|
||||
iconSize: 9,
|
||||
margin: const EdgeInsetsDirectional.only(start: 8),
|
||||
onTapActionCallback: () => onEmailActionClick?.call(
|
||||
emailSelected,
|
||||
EmailActionType.markAsRead,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -160,6 +187,7 @@ class InformationSenderAndReceiverBuilder extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
if (responsiveUtils.isMobile(context))
|
||||
ReceivedTimeBuilder(
|
||||
emailSelected: emailSelected,
|
||||
|
||||
@@ -12,12 +12,9 @@ class PrefixRecipientWidget extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 6),
|
||||
child: Text(
|
||||
'${prefixEmailAddress.asName(context)}:',
|
||||
style: ThemeUtils.textStyleBodyBody1(color: AppColor.steelGray400),
|
||||
),
|
||||
return Text(
|
||||
'${prefixEmailAddress.asName(context)}:',
|
||||
style: ThemeUtils.textStyleBodyBody1(color: AppColor.steelGray400),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user