diff --git a/src/mail-app/mail/view/MailViewerHeader.ts b/src/mail-app/mail/view/MailViewerHeader.ts index c41f8aec9cf5..f2e1a68396ab 100644 --- a/src/mail-app/mail/view/MailViewerHeader.ts +++ b/src/mail-app/mail/view/MailViewerHeader.ts @@ -192,6 +192,8 @@ export class MailViewerHeader implements Component { private renderSubjectActionsLine(attrs: MailViewerHeaderAttrs) { const { viewModel } = attrs const classes = this.makeSubjectActionsLineClasses() + const senderName = viewModel.getDisplayedSender()?.name?.trim() ?? "" + const displayAddressForSender = senderName === "" return m(classes, [ m( @@ -230,7 +232,10 @@ export class MailViewerHeader implements Component { ) : null, this.tutaoBadge(viewModel), - m("span.text-break" + (viewModel.isUnread() ? ".font-weight-600" : ""), viewModel.getDisplayedSender()?.name ?? ""), + m( + "span.text-break" + (viewModel.isUnread() ? ".font-weight-600" : "") + (displayAddressForSender ? ".invisible" : ""), + displayAddressForSender ? viewModel.getDisplayedSender()?.address : senderName, + ), ], ), m(