TF-1706 Fix grey bar on server CYRUS
(cherry picked from commit 3ae632c967607cd84ddd79da8d9e17421f6b31ff)
This commit is contained in:
@@ -73,6 +73,22 @@ class PresentationEmail with EquatableMixin {
|
||||
}
|
||||
}
|
||||
|
||||
String get firstEmailAddressInFrom {
|
||||
if (from?.isNotEmpty == true) {
|
||||
return from!.first.emailAddress;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
EmailAddress? get firstFromAddress {
|
||||
if (from?.isNotEmpty == true) {
|
||||
return from!.first;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
String getAvatarText() {
|
||||
if (getSenderName().isNotEmpty) {
|
||||
return getSenderName().firstLetterToUpperCase;
|
||||
|
||||
@@ -19,7 +19,11 @@ import 'package:model/mailbox/select_mode.dart';
|
||||
extension PresentationEmailExtension on PresentationEmail {
|
||||
|
||||
List<Color> get avatarColors {
|
||||
return from?.first.avatarColors ?? AppColor.mapGradientColor.first;
|
||||
if (from?.isNotEmpty == true) {
|
||||
return from!.first.avatarColors;
|
||||
} else {
|
||||
return AppColor.mapGradientColor.first;
|
||||
}
|
||||
}
|
||||
|
||||
int numberOfAllEmailAddress() => to.numberEmailAddress() + cc.numberEmailAddress() + bcc.numberEmailAddress();
|
||||
|
||||
Reference in New Issue
Block a user