Fix crash when advanced search with only select attachment
This commit is contained in:
@@ -55,7 +55,13 @@ class PresentationEmail with EquatableMixin {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
String getSenderName() => from?.first.asString() ?? '';
|
String getSenderName() {
|
||||||
|
if (from?.isNotEmpty == true) {
|
||||||
|
return from?.first.asString() ?? '';
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String getAvatarText() {
|
String getAvatarText() {
|
||||||
if (getSenderName().isNotEmpty) {
|
if (getSenderName().isNotEmpty) {
|
||||||
@@ -76,7 +82,13 @@ class PresentationEmail with EquatableMixin {
|
|||||||
|
|
||||||
bool get withAttachments => hasAttachment == true;
|
bool get withAttachments => hasAttachment == true;
|
||||||
|
|
||||||
String get mailboxName => mailboxNames?.first?.name ?? '';
|
String get mailboxName {
|
||||||
|
if (mailboxNames?.isNotEmpty == true) {
|
||||||
|
return mailboxNames?.first?.name ?? '';
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String get routeWebAsString => routeWeb.toString();
|
String get routeWebAsString => routeWeb.toString();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user