Changed read / unread email display for browser
This commit is contained in:
@@ -346,11 +346,11 @@ class EmailTileBuilder {
|
|||||||
? RichTextBuilder(
|
? RichTextBuilder(
|
||||||
_getInformationSender(),
|
_getInformationSender(),
|
||||||
_searchQuery!.value,
|
_searchQuery!.value,
|
||||||
const TextStyle(fontSize: 15, color: AppColor.colorNameEmail, fontWeight: FontWeight.w600),
|
TextStyle(fontSize: 15, color: _buildTextColorForReadEmail(), fontWeight: _buildFontForReadEmail()),
|
||||||
const TextStyle(fontSize: 15, color: AppColor.colorNameEmail, backgroundColor: AppColor.bgWordSearch, fontWeight: FontWeight.w600)).build()
|
TextStyle(fontSize: 15, color: _buildTextColorForReadEmail(), fontWeight: _buildFontForReadEmail(), backgroundColor: AppColor.bgWordSearch)).build()
|
||||||
: Text(_getInformationSender(),
|
: Text(_getInformationSender(),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
style: const TextStyle(fontSize: 15, color: AppColor.colorNameEmail, fontWeight: FontWeight.w600)),
|
style: TextStyle(fontSize: 15, color: _buildTextColorForReadEmail(), fontWeight: _buildFontForReadEmail())),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 24),
|
const SizedBox(width: 24),
|
||||||
Expanded(child: _buildSubjectAndContent()),
|
Expanded(child: _buildSubjectAndContent()),
|
||||||
@@ -448,7 +448,7 @@ class EmailTileBuilder {
|
|||||||
Padding(padding: const EdgeInsets.only(right: 20, left: 8),
|
Padding(padding: const EdgeInsets.only(right: 20, left: 8),
|
||||||
child: Text(_presentationEmail.getReceivedAt(Localizations.localeOf(_context).toLanguageTag()),
|
child: Text(_presentationEmail.getReceivedAt(Localizations.localeOf(_context).toLanguageTag()),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
style: const TextStyle(fontSize: 13, color: AppColor.colorContentEmail, fontWeight: FontWeight.normal)))
|
style: TextStyle(fontSize: 13, color: _buildTextColorForReadEmail(), fontWeight: _buildFontForReadEmail())))
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -476,11 +476,11 @@ class EmailTileBuilder {
|
|||||||
? RichTextBuilder(
|
? RichTextBuilder(
|
||||||
_presentationEmail.getEmailTitle(),
|
_presentationEmail.getEmailTitle(),
|
||||||
_searchQuery!.value,
|
_searchQuery!.value,
|
||||||
const TextStyle(fontSize: 13, color: AppColor.colorNameEmail, fontWeight: FontWeight.w600),
|
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(_presentationEmail.getEmailTitle(),
|
: Text(_presentationEmail.getEmailTitle(),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
style: const TextStyle(fontSize: 13, color: AppColor.colorNameEmail, fontWeight: FontWeight.w600))
|
style: TextStyle(fontSize: 13, color: _buildTextColorForReadEmail(), fontWeight: _buildFontForReadEmail()))
|
||||||
),
|
),
|
||||||
if (_presentationEmail.getEmailTitle().isNotEmpty) const SizedBox(width: 12),
|
if (_presentationEmail.getEmailTitle().isNotEmpty) const SizedBox(width: 12),
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -539,6 +539,15 @@ class EmailTileBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FontWeight _buildFontForReadEmail() {
|
||||||
|
return !_presentationEmail.hasRead ? FontWeight.w600 : FontWeight.normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
Color _buildTextColorForReadEmail() {
|
||||||
|
return _presentationEmail.hasRead ? AppColor.colorContentEmail : 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