Skip to content

Commit

Permalink
Make calorie goal in settings have commas
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Bisenius committed May 19, 2024
1 parent 8564864 commit a19c06a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Calorie Counter/Screens/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit a19c06a

Please sign in to comment.