diff --git a/enzevalos_iphone.xcodeproj/project.pbxproj b/enzevalos_iphone.xcodeproj/project.pbxproj index 9e226c82f4adf42e2ae5a7c4d72e886fcd761a28..0940e514337573c25cebb69ef5effb24b780a817 100644 --- a/enzevalos_iphone.xcodeproj/project.pbxproj +++ b/enzevalos_iphone.xcodeproj/project.pbxproj @@ -965,8 +965,8 @@ 476406892416B54D00C7D426 /* KeyRecordRow.swift */, 4764068B2416B54D00C7D426 /* InboxCoordinator.swift */, 4750BDE02539C5FC00F6D5AB /* InboxView.swift */, - 47C3490125489F52008D290C /* MailRowView.swift */, 47FA8EAB254D77DE006883D0 /* MailListView.swift */, + 47C3490125489F52008D290C /* MailRowView.swift */, ); path = Inbox; sourceTree = "<group>"; diff --git a/enzevalos_iphone/SwiftUI/SupportingViews/MailRowView.swift b/enzevalos_iphone/SwiftUI/SupportingViews/MailRowView.swift index 192eb599de7151666a21e6beaca1255c1c7247fc..ebab432eef9764114b271fe0639dc06bbb53ea31 100644 --- a/enzevalos_iphone/SwiftUI/SupportingViews/MailRowView.swift +++ b/enzevalos_iphone/SwiftUI/SupportingViews/MailRowView.swift @@ -14,28 +14,31 @@ struct MailRowView <M: DisplayMail>: View { var body: some View { HStack { - senderAvatar + avatar - // Sender name, subject, recency, and attachments VStack(alignment: .leading) { HStack { + // Sender name Text(mail.sender.name) .fontWeight(mail.isRead ? .regular : .medium) .lineLimit(1) Spacer() + // Arrival time Text(mail.date.timeAgoText()) .font(.caption) } HStack { + // Subject Text(mail.subject) .font(.caption) .lineLimit(2) Spacer() + // Attachment indicator if relevant if !mail.displayAttachments.isEmpty { Image(systemName: "paperclip") .font(.caption) @@ -49,11 +52,12 @@ struct MailRowView <M: DisplayMail>: View { .frame(height: 50) } - private var senderAvatar: some View { + private var avatar: some View { mail.sender.avatar .resizable() .aspectRatio(contentMode: .fit) .shadow(radius: 2) + .opacity(mail.isRead ? 0.45 : 1) } }