TF-1706 Fix grey bar on server CYRUS

(cherry picked from commit 3ae632c967607cd84ddd79da8d9e17421f6b31ff)
This commit is contained in:
dab246
2023-05-15 18:14:34 +07:00
committed by Dat Vu
parent 5bfd61abd8
commit 5e69c8bd1c
7 changed files with 94 additions and 5 deletions
@@ -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();