Stabilize beta release with warning cleanup and edge-case fixes
This commit is contained in:
@@ -54,12 +54,12 @@ final class ProgressViewModel {
|
||||
|
||||
/// Count of trips for the selected sport (stub - can be enhanced)
|
||||
var tripCount: Int {
|
||||
// TODO: Fetch saved trips count from SwiftData
|
||||
0
|
||||
savedTripCount
|
||||
}
|
||||
|
||||
/// Recent visits sorted by date (cached, recomputed on data change)
|
||||
private(set) var recentVisits: [VisitSummary] = []
|
||||
private(set) var savedTripCount: Int = 0
|
||||
|
||||
// MARK: - Configuration
|
||||
|
||||
@@ -89,6 +89,7 @@ final class ProgressViewModel {
|
||||
sortBy: [SortDescriptor(\.visitDate, order: .reverse)]
|
||||
)
|
||||
visits = try context.fetch(descriptor)
|
||||
savedTripCount = try context.fetchCount(FetchDescriptor<SavedTrip>())
|
||||
}
|
||||
} catch {
|
||||
self.error = error
|
||||
|
||||
Reference in New Issue
Block a user