From 7946161945e9f774de7ede6727bbedfe4657eb8a Mon Sep 17 00:00:00 2001 From: Trey t Date: Mon, 12 Jan 2026 18:35:04 -0600 Subject: [PATCH] feat: show location info in schedule view Adds stadium name and city to game rows in the schedule list. The GameRowView now has a showLocation parameter that displays a location row with mappin icon when enabled. Co-Authored-By: Claude Opus 4.5 --- .../Schedule/Views/ScheduleListView.swift | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/SportsTime/Features/Schedule/Views/ScheduleListView.swift b/SportsTime/Features/Schedule/Views/ScheduleListView.swift index 8b8d140..c34eaaa 100644 --- a/SportsTime/Features/Schedule/Views/ScheduleListView.swift +++ b/SportsTime/Features/Schedule/Views/ScheduleListView.swift @@ -92,7 +92,7 @@ struct ScheduleListView: View { ForEach(viewModel.gamesBySport, id: \.sport) { sportGroup in Section { ForEach(sportGroup.games) { richGame in - GameRowView(game: richGame, showDate: true) + GameRowView(game: richGame, showDate: true, showLocation: true) } } header: { HStack(spacing: 8) { @@ -208,6 +208,7 @@ struct SportFilterChip: View { struct GameRowView: View { let game: RichGame var showDate: Bool = false + var showLocation: Bool = false private var isToday: Bool { Calendar.current.isDateInToday(game.game.dateTime) @@ -262,6 +263,18 @@ struct GameRowView: View { } .font(.caption) .foregroundStyle(.secondary) + + // Location info (when grouped by game) + if showLocation { + HStack(spacing: 4) { + Image(systemName: "mappin.circle.fill") + .font(.caption2) + .foregroundStyle(.tertiary) + Text(game.stadium.city) + .font(.caption) + .foregroundStyle(.secondary) + } + } } .padding(.vertical, 4) .listRowBackground(isToday ? Color.orange.opacity(0.1) : nil)