TF-119 Filter messages with unread, attachments, starred
This commit is contained in:
@@ -48,6 +48,7 @@ class EmailController extends BaseController {
|
||||
final emailContents = <EmailContent>[].obs;
|
||||
final attachments = <Attachment>[].obs;
|
||||
EmailId? _currentEmailId;
|
||||
List<Color>? _currentAvatarColor;
|
||||
|
||||
EmailController(
|
||||
this._getEmailContentInteractor,
|
||||
@@ -66,6 +67,7 @@ class EmailController extends BaseController {
|
||||
mailboxDashBoardController.selectedEmail.listen((presentationEmail) {
|
||||
if (_currentEmailId != presentationEmail?.id) {
|
||||
_currentEmailId = presentationEmail?.id;
|
||||
_currentAvatarColor = presentationEmail?.avatarColors;
|
||||
_clearEmailContent();
|
||||
final accountId = mailboxDashBoardController.accountId.value;
|
||||
if (accountId != null && presentationEmail != null) {
|
||||
@@ -151,7 +153,7 @@ class EmailController extends BaseController {
|
||||
|
||||
void _markAsEmailReadSuccess(Success success) {
|
||||
if (success is MarkAsEmailReadSuccess) {
|
||||
mailboxDashBoardController.setSelectedEmail(success.updatedEmail.toPresentationEmail(selectMode: SelectMode.ACTIVE));
|
||||
mailboxDashBoardController.setSelectedEmail(success.updatedEmail.toPresentationEmail(selectMode: SelectMode.ACTIVE, avatarColors: _currentAvatarColor));
|
||||
}
|
||||
mailboxDashBoardController.dispatchState(Right(success));
|
||||
|
||||
|
||||
@@ -83,10 +83,10 @@ class EmailView extends GetView {
|
||||
width: double.infinity,
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.only(
|
||||
left: responsiveUtils.isMobile(context) ? 16 : 24,
|
||||
right: responsiveUtils.isMobile(context) ? 16 : 24,
|
||||
bottom: responsiveUtils.isMobile(context) ? 16 : 24,
|
||||
top: responsiveUtils.isMobile(context) ? 10 : 16),
|
||||
left: 16,
|
||||
right: 16,
|
||||
bottom: 16,
|
||||
top: 16),
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -120,9 +120,9 @@ class EmailView extends GetView {
|
||||
Widget _buildEmailMessage(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: responsiveUtils.isMobile(context) ? 16 : 24,
|
||||
left: responsiveUtils.isMobile(context) ? 16 : 24,
|
||||
right: responsiveUtils.isMobile(context) ? 16 : 24,
|
||||
bottom: 16,
|
||||
left: 16,
|
||||
right: 16,
|
||||
top: 10),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
|
||||
@@ -42,7 +42,7 @@ class EmailContentItemBuilder {
|
||||
padding: EdgeInsets.zero,
|
||||
child: Text(
|
||||
_emailContent.content,
|
||||
style: TextStyle(fontSize: 14, color: AppColor.nameUserColor)));
|
||||
style: TextStyle(fontSize: 14, color: AppColor.colorNameEmail)));
|
||||
case EmailContentType.other:
|
||||
return SizedBox.shrink();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user