Shorter date formatting, short title for subscription
This commit is contained in:
parent
620d0ab88d
commit
50f502436f
2 changed files with 6 additions and 7 deletions
|
|
@ -7,18 +7,17 @@ extension Notification {
|
|||
let calendar = Calendar.current
|
||||
|
||||
if calendar.isDateInYesterday(date) {
|
||||
return "Yesterday"
|
||||
return "yesterday"
|
||||
}
|
||||
|
||||
let dateFormatter = DateFormatter()
|
||||
|
||||
if calendar.isDateInToday(date) {
|
||||
dateFormatter.dateFormat = "h:mm a"
|
||||
dateFormatter.amSymbol = "AM"
|
||||
dateFormatter.pmSymbol = "PM"
|
||||
} else {
|
||||
dateFormatter.dateStyle = .medium
|
||||
dateFormatter.dateStyle = .none
|
||||
dateFormatter.timeStyle = .short
|
||||
} else {
|
||||
dateFormatter.dateStyle = .short
|
||||
dateFormatter.timeStyle = .none
|
||||
}
|
||||
|
||||
return dateFormatter.string(from: date)
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ struct NotificationListView: View {
|
|||
}
|
||||
}
|
||||
ToolbarItem(placement: .principal) {
|
||||
Text(subscription.displayName())
|
||||
Text(subscription.topicName())
|
||||
.font(.headline)
|
||||
.lineLimit(1)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue