diff --git a/Mail/Views/New Message/ComposeMessageHeaderView.swift b/Mail/Views/New Message/ComposeMessageHeaderView.swift index 96632756b..eec0ea39a 100644 --- a/Mail/Views/New Message/ComposeMessageHeaderView.swift +++ b/Mail/Views/New Message/ComposeMessageHeaderView.swift @@ -83,4 +83,5 @@ struct ComposeMessageHeaderView: View { #Preview { ComposeMessageHeaderView(draft: Draft(), autocompletionType: .constant(nil), currentSignature: .constant(nil)) + .environmentObject(PreviewHelper.sampleMailboxManager) } diff --git a/Mail/Views/New Message/Header Cells/ComposeMessageSenderMenu.swift b/Mail/Views/New Message/Header Cells/ComposeMessageSenderMenu.swift index 514075f1e..3dafb8ba9 100644 --- a/Mail/Views/New Message/Header Cells/ComposeMessageSenderMenu.swift +++ b/Mail/Views/New Message/Header Cells/ComposeMessageSenderMenu.swift @@ -84,4 +84,5 @@ struct ComposeMessageSenderMenu: View { #Preview { ComposeMessageSenderMenu(currentSignature: .constant(nil), autocompletionType: nil, type: .from, text: "email@email.com") + .environmentObject(PreviewHelper.sampleMailboxManager) } diff --git a/Mail/Views/New Message/Header Cells/SenderMenuCell.swift b/Mail/Views/New Message/Header Cells/SenderMenuCell.swift index a36de5128..1f9d2e21e 100644 --- a/Mail/Views/New Message/Header Cells/SenderMenuCell.swift +++ b/Mail/Views/New Message/Header Cells/SenderMenuCell.swift @@ -16,6 +16,7 @@ along with this program. If not, see . */ +import InfomaniakCore import InfomaniakCoreUI import InfomaniakDI import MailCore @@ -24,6 +25,7 @@ import SwiftUI struct SenderMenuCell: View { @LazyInjectService private var matomo: MatomoUtils + @LazyInjectService private var platformDetector: PlatformDetectable @EnvironmentObject private var draftContentManager: DraftContentManager @@ -41,7 +43,11 @@ struct SenderMenuCell: View { draftContentManager.updateSignature(with: signature) } label: { Label { - Text("\(signature.senderName) (\(signature.name))") + if platformDetector.isMac { + Text("\(signature.senderName) (\(signature.name)) \(signature.senderEmailIdn)") + } else { + Text("\(signature.senderName) (\(signature.name))") + } } icon: { if signature == currentSignature { MailResourcesAsset.check.swiftUIImage