From e350a354a3a32841ef03e2d4ef0ea0ca2f5db4d3 Mon Sep 17 00:00:00 2001 From: Yusuf Suleman Date: Fri, 3 Apr 2026 02:13:27 -0500 Subject: [PATCH] fix: replace .defaultGoal with DailyGoal() to avoid macro expansion issue Co-Authored-By: Claude Opus 4.6 (1M context) --- .../Features/Fitness/Repository/FitnessRepository.swift | 2 +- .../Platform/Features/Fitness/ViewModels/TodayViewModel.swift | 2 +- ios/Platform/Platform/Features/Home/HomeViewModel.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/Platform/Platform/Features/Fitness/Repository/FitnessRepository.swift b/ios/Platform/Platform/Features/Fitness/Repository/FitnessRepository.swift index b3bd486..dc06990 100644 --- a/ios/Platform/Platform/Features/Fitness/Repository/FitnessRepository.swift +++ b/ios/Platform/Platform/Features/Fitness/Repository/FitnessRepository.swift @@ -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 diff --git a/ios/Platform/Platform/Features/Fitness/ViewModels/TodayViewModel.swift b/ios/Platform/Platform/Features/Fitness/ViewModels/TodayViewModel.swift index c18c785..34b20ba 100644 --- a/ios/Platform/Platform/Features/Fitness/ViewModels/TodayViewModel.swift +++ b/ios/Platform/Platform/Features/Fitness/ViewModels/TodayViewModel.swift @@ -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? diff --git a/ios/Platform/Platform/Features/Home/HomeViewModel.swift b/ios/Platform/Platform/Features/Home/HomeViewModel.swift index 63d45d9..6e2ab29 100644 --- a/ios/Platform/Platform/Features/Home/HomeViewModel.swift +++ b/ios/Platform/Platform/Features/Home/HomeViewModel.swift @@ -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?