Skip to content

Commit

Permalink
feat: show 10 upcoming events instead of 5
Browse files Browse the repository at this point in the history
  • Loading branch information
a11rew committed Nov 18, 2023
1 parent 9cce91d commit ec63e46
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Calendar Focus Sync/Views/UpcomingEventsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ struct UpcomingEventsView: View {
let events = appState.calendarEvents
.filter { $0.startDate > Date() }
.sorted { $0.startDate < $1.startDate }
.prefix(5)
.prefix(10)

let formatter = DateFormatter()
formatter.dateFormat = "h:mm a, d MMM"
formatter.dateFormat = "h:mm, d MMM"

return VStack(alignment: .leading) {
Text("Upcoming Events")
Expand All @@ -23,7 +23,6 @@ struct UpcomingEventsView: View {
}
} else {
ForEach(events, id: \.id) { event in

HStack {
Text(event.title)

Expand Down

0 comments on commit ec63e46

Please sign in to comment.