Change byline to truncate and only use 1 line

This commit is contained in:
Maurice Parker 2020-07-01 17:42:44 -05:00
parent 0b36498ff8
commit 269d9462fe
1 changed files with 4 additions and 0 deletions

View File

@ -23,16 +23,20 @@ struct TimelineItemView: View {
} }
VStack { VStack {
Text(verbatim: timelineItem.article.title ?? "N/A") Text(verbatim: timelineItem.article.title ?? "N/A")
.fontWeight(.semibold)
.lineLimit(3) .lineLimit(3)
.frame(maxWidth: .infinity, alignment: .leading) .frame(maxWidth: .infinity, alignment: .leading)
.padding(.trailing, 4) .padding(.trailing, 4)
Spacer() Spacer()
HStack { HStack {
Text(verbatim: timelineItem.byline) Text(verbatim: timelineItem.byline)
.lineLimit(1)
.truncationMode(.tail)
.font(.footnote) .font(.footnote)
.foregroundColor(.secondary) .foregroundColor(.secondary)
Spacer() Spacer()
Text(verbatim: timelineItem.dateTimeString) Text(verbatim: timelineItem.dateTimeString)
.lineLimit(1)
.font(.footnote) .font(.footnote)
.foregroundColor(.secondary) .foregroundColor(.secondary)
.padding(.trailing, 4) .padding(.trailing, 4)