From a19c06a3234abb06be7a95bb543b1e369de81850 Mon Sep 17 00:00:00 2001 From: Jim Bisenius Date: Sun, 19 May 2024 00:19:49 -0400 Subject: [PATCH] Make calorie goal in settings have commas --- Calorie Counter/Screens/SettingsView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Calorie Counter/Screens/SettingsView.swift b/Calorie Counter/Screens/SettingsView.swift index 5bc3058..b5ad9d3 100644 --- a/Calorie Counter/Screens/SettingsView.swift +++ b/Calorie Counter/Screens/SettingsView.swift @@ -74,7 +74,7 @@ struct SettingsView: View { */ settingsSection(header: "Goals") { - settingsRow(title: "Calories", value: calorieGoal > 0 ? "\(calorieGoal) calories" : "N/A", lastRow: nil, gray: nil, danger: nil, onTap: editGoal, grayValue: calorieGoal == 0) + settingsRow(title: "Calories", value: calorieGoal > 0 ? "\(formatNumberWithCommas(calorieGoal)) calories" : "N/A", lastRow: nil, gray: nil, danger: nil, onTap: editGoal, grayValue: calorieGoal == 0) .onAppear { calorieGoal = UserDefaults.standard.integer(forKey: "caloriesGoal") }