Skip to content

Commit

Permalink
fix: Display sender mailboxes on mac (#1365)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeWeidmann authored Mar 26, 2024
2 parents 5ce954a + ee71d8a commit d154126
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions Mail/Views/New Message/ComposeMessageHeaderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,5 @@ struct ComposeMessageHeaderView: View {

#Preview {
ComposeMessageHeaderView(draft: Draft(), autocompletionType: .constant(nil), currentSignature: .constant(nil))
.environmentObject(PreviewHelper.sampleMailboxManager)
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,5 @@ struct ComposeMessageSenderMenu: View {

#Preview {
ComposeMessageSenderMenu(currentSignature: .constant(nil), autocompletionType: nil, type: .from, text: "email@email.com")
.environmentObject(PreviewHelper.sampleMailboxManager)
}
8 changes: 7 additions & 1 deletion Mail/Views/New Message/Header Cells/SenderMenuCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import InfomaniakCore
import InfomaniakCoreUI
import InfomaniakDI
import MailCore
Expand All @@ -24,6 +25,7 @@ import SwiftUI

struct SenderMenuCell: View {
@LazyInjectService private var matomo: MatomoUtils
@LazyInjectService private var platformDetector: PlatformDetectable

@EnvironmentObject private var draftContentManager: DraftContentManager

Expand All @@ -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
Expand Down

0 comments on commit d154126

Please sign in to comment.