fix: replace .defaultGoal with DailyGoal() to avoid macro expansion issue
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -98,7 +98,7 @@ final class FitnessRepository {
|
||||
|
||||
/// Kept for GoalsViewModel compatibility — loads entries + goals into the old-style properties.
|
||||
var entries: [FoodEntry] = []
|
||||
var goals: DailyGoal = .defaultGoal
|
||||
var goals: DailyGoal = DailyGoal()
|
||||
|
||||
func loadDay(date: String) async {
|
||||
isLoading = true
|
||||
|
||||
@@ -3,7 +3,7 @@ import Foundation
|
||||
@MainActor @Observable
|
||||
final class TodayViewModel {
|
||||
var entries: [FoodEntry] = []
|
||||
var goal: DailyGoal = .defaultGoal
|
||||
var goal: DailyGoal = DailyGoal()
|
||||
var selectedDate: Date = Date()
|
||||
var isLoading = true
|
||||
var errorMessage: String?
|
||||
|
||||
@@ -3,7 +3,7 @@ import Foundation
|
||||
@MainActor @Observable
|
||||
final class HomeViewModel {
|
||||
var todayEntries: [FoodEntry] = []
|
||||
var goal: DailyGoal = .defaultGoal
|
||||
var goal: DailyGoal = DailyGoal()
|
||||
var isLoading = true
|
||||
var errorMessage: String?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user