TF-3894 Fix blank email content when opening email
This commit is contained in:
@@ -129,6 +129,26 @@ extension SessionExtension on Session {
|
||||
return null;
|
||||
}
|
||||
|
||||
String generateOwnEmailAddressFromDomain(String domain) {
|
||||
try {
|
||||
final userName = username.value;
|
||||
if (domain.trim().isEmpty || userName.trim().isEmpty) return '';
|
||||
|
||||
if (userName.endsWith(domain)) return userName;
|
||||
|
||||
return '$userName@$domain';
|
||||
} catch (e) {
|
||||
logError('$runtimeType::generateOwnEmailAddressFromDomain: Exception: $e');
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
String getOwnEmailAddressOrUsername() {
|
||||
final emailAddress = getOwnEmailAddressOrEmpty();
|
||||
if (emailAddress.isNotEmpty) return emailAddress;
|
||||
return getUserDisplayName();
|
||||
}
|
||||
|
||||
JmapAccount get personalAccount {
|
||||
if (accounts.isNotEmpty) {
|
||||
final listPersonalAccount = accounts.entries
|
||||
|
||||
Reference in New Issue
Block a user