* Add folder info when open mail list from Label (cherry picked from commit de0bb4ee02030ca90126766a8713a6826d791acd) * Add unit test for `hasMailboxLabel` function in BaseEmailItemTile mixin (cherry picked from commit 18f8d1847acccd6f95006b93903f0caa6c0408df) * TF-4292 Add E2E test for test case `Add folder info when open mail list from Label` on mobile (cherry picked from commit 1c209e333510db161522e4449ad7fb2e5d28399f)
This commit is contained in:
@@ -10,7 +10,6 @@ import 'package:core/presentation/views/text/text_overflow_builder.dart';
|
||||
import 'package:core/utils/platform_info.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:model/email/email_action_type.dart';
|
||||
import 'package:model/email/presentation_email.dart';
|
||||
import 'package:model/extensions/presentation_email_extension.dart';
|
||||
@@ -26,15 +25,16 @@ typedef OnMoreActionClick = Future<void> Function(PresentationEmail, RelativeRec
|
||||
|
||||
mixin BaseEmailItemTile {
|
||||
|
||||
final responsiveUtils = Get.find<ResponsiveUtils>();
|
||||
final imagePaths = Get.find<ImagePaths>();
|
||||
ResponsiveUtils get responsiveUtils;
|
||||
|
||||
ImagePaths get imagePaths;
|
||||
|
||||
Widget buildMailboxContain(
|
||||
BuildContext context,
|
||||
bool isSearchEmailRunning,
|
||||
bool showMailboxLabel,
|
||||
PresentationEmail email
|
||||
) {
|
||||
if (hasMailboxLabel(isSearchEmailRunning, email)) {
|
||||
if (hasMailboxLabel(showMailboxLabel, email)) {
|
||||
return Container(
|
||||
margin: const EdgeInsetsDirectional.only(start: 8),
|
||||
padding: const EdgeInsetsDirectional.symmetric(horizontal: 8),
|
||||
@@ -68,12 +68,12 @@ mixin BaseEmailItemTile {
|
||||
Color buildTextColorForReadEmail(PresentationEmail email) =>
|
||||
email.hasRead ? AppColor.steelGray400 : Colors.black;
|
||||
|
||||
bool hasMailboxLabel(bool isSearchEmailRunning, PresentationEmail email) {
|
||||
return isSearchEmailRunning && email.mailboxContain != null;
|
||||
bool hasMailboxLabel(bool showMailboxLabel, PresentationEmail email) {
|
||||
return showMailboxLabel && email.mailboxContain != null;
|
||||
}
|
||||
|
||||
String informationSender(PresentationEmail email, PresentationMailbox? mailbox) {
|
||||
if (mailbox?.isSent == true || mailbox?.isDrafts == true || mailbox?.isOutbox == true) {
|
||||
if (mailbox?.isOutgoingMailbox == true) {
|
||||
return email.recipientsName();
|
||||
} else {
|
||||
return email.getSenderName();
|
||||
|
||||
Reference in New Issue
Block a user