Changed read / unread email display for mobile & tablet
This commit is contained in:
@@ -93,12 +93,12 @@ class EmailTileBuilder {
|
|||||||
_getInformationSender(),
|
_getInformationSender(),
|
||||||
_searchQuery!.value,
|
_searchQuery!.value,
|
||||||
const TextStyle(fontSize: 15, color: AppColor.colorNameEmail, fontWeight: FontWeight.w600),
|
const TextStyle(fontSize: 15, color: AppColor.colorNameEmail, fontWeight: FontWeight.w600),
|
||||||
const TextStyle(fontSize: 15, color: AppColor.colorNameEmail, backgroundColor: AppColor.bgWordSearch, fontWeight: FontWeight.w600)).build()
|
TextStyle(fontSize: 15, color: _buildTextColorForReadEmail(), backgroundColor: AppColor.bgWordSearch, fontWeight: _buildFontForReadEmail())).build()
|
||||||
: Text(
|
: Text(
|
||||||
_getInformationSender(),
|
_getInformationSender(),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow:TextOverflow.ellipsis,
|
overflow:TextOverflow.ellipsis,
|
||||||
style: const TextStyle(fontSize: 15, color: AppColor.colorNameEmail, fontWeight: FontWeight.w600))
|
style: TextStyle(fontSize: 15, color: _buildTextColorForReadEmail(), fontWeight: _buildFontForReadEmail()))
|
||||||
),
|
),
|
||||||
if (_presentationEmail.hasAttachment == true)
|
if (_presentationEmail.hasAttachment == true)
|
||||||
Padding(
|
Padding(
|
||||||
@@ -110,7 +110,7 @@ class EmailTileBuilder {
|
|||||||
_presentationEmail.getReceivedAt(Localizations.localeOf(_context).toLanguageTag()),
|
_presentationEmail.getReceivedAt(Localizations.localeOf(_context).toLanguageTag()),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow:TextOverflow.ellipsis,
|
overflow:TextOverflow.ellipsis,
|
||||||
style: const TextStyle(fontSize: 13, color: AppColor.colorContentEmail))),
|
style: TextStyle(fontSize: 13, color: _buildTextColorForReadEmail(), fontWeight: _buildFontForReadEmail()))),
|
||||||
SvgPicture.asset(_imagePaths.icChevron, width: 16, height: 16, fit: BoxFit.fill),
|
SvgPicture.asset(_imagePaths.icChevron, width: 16, height: 16, fit: BoxFit.fill),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -127,13 +127,13 @@ class EmailTileBuilder {
|
|||||||
? RichTextBuilder(
|
? RichTextBuilder(
|
||||||
_presentationEmail.getEmailTitle(),
|
_presentationEmail.getEmailTitle(),
|
||||||
_searchQuery!.value,
|
_searchQuery!.value,
|
||||||
const TextStyle(fontSize: 13, color: AppColor.colorNameEmail),
|
TextStyle(fontSize: 13, color: _buildTextColorForReadEmail(), fontWeight: _buildFontForReadEmail()),
|
||||||
const TextStyle(fontSize: 13, backgroundColor: AppColor.bgWordSearch, color: AppColor.colorNameEmail)).build()
|
TextStyle(fontSize: 13, backgroundColor: AppColor.bgWordSearch, color: _buildTextColorForReadEmail(), fontWeight: _buildFontForReadEmail())).build()
|
||||||
: Text(
|
: Text(
|
||||||
_presentationEmail.getEmailTitle(),
|
_presentationEmail.getEmailTitle(),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: const TextStyle(fontSize: 13, color: AppColor.colorNameEmail))
|
style: TextStyle(fontSize: 13, color: _buildTextColorForReadEmail(), fontWeight: _buildFontForReadEmail()))
|
||||||
),
|
),
|
||||||
if (_searchStatus == SearchStatus.ACTIVE && _presentationEmail.mailboxName.isNotEmpty)
|
if (_searchStatus == SearchStatus.ACTIVE && _presentationEmail.mailboxName.isNotEmpty)
|
||||||
Container(
|
Container(
|
||||||
@@ -333,6 +333,16 @@ class EmailTileBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FontWeight _buildFontForReadEmail() {
|
||||||
|
if (!_presentationEmail.hasRead) return FontWeight.w600;
|
||||||
|
return FontWeight.normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
Color _buildTextColorForReadEmail() {
|
||||||
|
if (_presentationEmail.hasRead) return AppColor.colorContentEmail;
|
||||||
|
return AppColor.colorNameEmail;
|
||||||
|
}
|
||||||
|
|
||||||
String _getInformationSender() {
|
String _getInformationSender() {
|
||||||
if (_mailboxRole == PresentationMailbox.roleSent
|
if (_mailboxRole == PresentationMailbox.roleSent
|
||||||
|| _mailboxRole == PresentationMailbox.roleDrafts
|
|| _mailboxRole == PresentationMailbox.roleDrafts
|
||||||
|
|||||||
Reference in New Issue
Block a user