TF-105 [BUG] Fix no subject should show empty instead of null
This commit is contained in:
@@ -44,12 +44,7 @@ class PresentationEmail with EquatableMixin {
|
||||
}
|
||||
);
|
||||
|
||||
String getSenderName() {
|
||||
if (from != null && from!.isNotEmpty) {
|
||||
return from!.first.asString();
|
||||
}
|
||||
return '';
|
||||
}
|
||||
String getSenderName() => from?.first.asString() ?? '';
|
||||
|
||||
String getAvatarText() {
|
||||
if (getSenderName().isNotEmpty) {
|
||||
@@ -58,9 +53,9 @@ class PresentationEmail with EquatableMixin {
|
||||
return '';
|
||||
}
|
||||
|
||||
String getEmailTitle() => subject != null ? subject! : '';
|
||||
String getEmailTitle() => subject ?? '';
|
||||
|
||||
String getPartialContent() => preview != null ? preview! : '';
|
||||
String getPartialContent() => preview ?? '';
|
||||
|
||||
bool isUnReadEmail() => !(keywords?.containsKey(KeyWordIdentifier.emailSeen) == true);
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ extension EmailAddressExtension on EmailAddress {
|
||||
return '';
|
||||
}
|
||||
|
||||
String get emailAddress => email != null ? email! : '';
|
||||
String get emailAddress => email ?? '';
|
||||
|
||||
String get displayName => name != null ? name! : '';
|
||||
String get displayName => name ?? '';
|
||||
|
||||
EmailAddressCache toEmailAddressCache() => EmailAddressCache(displayName, emailAddress);
|
||||
}
|
||||
Reference in New Issue
Block a user