diff --git a/enzevalos_iphone/SwiftUI/Inbox/Inbox.swift b/enzevalos_iphone/SwiftUI/Inbox/Inbox.swift index 06e10bf34bb0f3d88047a25140bae54fbae44ca3..b68963eb3b851796c043a7353134a9016a79a85f 100644 --- a/enzevalos_iphone/SwiftUI/Inbox/Inbox.swift +++ b/enzevalos_iphone/SwiftUI/Inbox/Inbox.swift @@ -48,7 +48,6 @@ struct Inbox: View { private var mailList: some View { List (self.keyrecords.filter(filterKeyRecord), id: \.self){ record in - //KeyRecordRow(keyrecord: record, coord: self.coord) KeyRecordRow(keyrecord: record) } .resignKeyboardOnDragGesture() // hide keyboard when dragging diff --git a/enzevalos_iphone/SwiftUI/Inbox/KeyRecordRow.swift b/enzevalos_iphone/SwiftUI/Inbox/KeyRecordRow.swift index 2efe5c1ab70597851af3a561fe86db16fe255e4c..791fe7b25d13ee25e1e2c323f831a2c00be565a6 100644 --- a/enzevalos_iphone/SwiftUI/Inbox/KeyRecordRow.swift +++ b/enzevalos_iphone/SwiftUI/Inbox/KeyRecordRow.swift @@ -11,14 +11,16 @@ import SwiftUI struct KeyRecordRow: View { private static let coord = AppDelegate.getAppDelegate().inboxCoordinator - var keyrecord: KeyRecord + let keyrecord: KeyRecord var first: PersistentMail? var second: PersistentMail? + let name: String init(keyrecord: KeyRecord) { self.keyrecord = keyrecord first = keyrecord.firstMail second = keyrecord.secondMail + name = keyrecord.name } @@ -31,7 +33,7 @@ struct KeyRecordRow: View { .offset(y: -10) } HStack { - name + nameView Spacer() moreMails } @@ -76,8 +78,8 @@ struct KeyRecordRow: View { } } - private var name: some View { - Text(self.keyrecord.myNick) + private var nameView: some View { + Text(name) .frame(maxWidth: 300, alignment: .leading) .lineLimit(1) .onTapGesture {