fix(sync): add foreground sync, remove manual sync button
- Add scenePhase observer to sync when app returns to foreground - Remove misleading "Sync Schedules" button from Settings (it only reloaded local data, didn't actually sync from CloudKit) - Fix GamesHistoryView to refresh list after deleting a visit Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,12 @@ struct GamesHistoryView: View {
|
||||
}
|
||||
}
|
||||
.navigationTitle("Games Attended")
|
||||
.sheet(item: $selectedVisit) { visit in
|
||||
.sheet(item: $selectedVisit, onDismiss: {
|
||||
// Refresh data after sheet closes (handles deletion case)
|
||||
Task {
|
||||
await viewModel?.loadGames()
|
||||
}
|
||||
}) { visit in
|
||||
if let stadium = AppDataProvider.shared.stadium(for: visit.stadiumId) {
|
||||
VisitDetailView(visit: visit, stadium: stadium)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user