Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small Changes to Weight, InputForm & Workout Selection #53

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Stronger/Account/Weight.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
HStack {
Text(WeightKey.name)
Spacer()
Text("\(weight) kg")
Text("\(weight) lbs")

Check warning on line 50 in Stronger/Account/Weight.swift

View check run for this annotation

Codecov / codecov/patch

Stronger/Account/Weight.swift#L50

Added line #L50 was not covered by tests
.foregroundColor(.secondary)
}
.accessibilityElement(children: .combine)
Expand Down
4 changes: 2 additions & 2 deletions Stronger/Exercise/WorkoutSelection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,13 @@
} else {
// Check if there are documents with selectedDay equal to 1
let selectedDay1Count = querySnapshot?.documents.filter { $0["exerciseDay"] as? Int == 2 }.count ?? 0
if selectedDay1Count > 0 {
if selectedDay1Count > 3 {

Check warning on line 287 in Stronger/Exercise/WorkoutSelection.swift

View check run for this annotation

Codecov / codecov/patch

Stronger/Exercise/WorkoutSelection.swift#L287

Added line #L287 was not covered by tests
print("Documents found with selectedDay equal to 2. Setting selectedDay to 3.")
self.selectedDay = 3
} else {
// Check if there are documents with selectedDay equal to 2
let selectedDay2Count = querySnapshot?.documents.filter { $0["exerciseDay"] as? Int == 1 }.count ?? 0
if selectedDay2Count > 0 {
if selectedDay2Count > 3 {

Check warning on line 293 in Stronger/Exercise/WorkoutSelection.swift

View check run for this annotation

Codecov / codecov/patch

Stronger/Exercise/WorkoutSelection.swift#L293

Added line #L293 was not covered by tests
print("Documents found with selectedDay equal to 1. Setting selectedDay to 2.")
self.selectedDay = 2
} else {
Expand Down
3 changes: 3 additions & 0 deletions Stronger/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
},
"%lld kg" : {

},
"%lld lbs" : {

},
"ACCOUNT_NEXT" : {
"localizations" : {
Expand Down
2 changes: 1 addition & 1 deletion Stronger/Workout/InputForm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
}
.alert(isPresented: $showAlert) { submissionAlert }
.navigationDestination(isPresented: $navigateToWorkoutSelection) {
WorkoutHome(presentingAccount: $presentingAccount)
WorkoutSelection(presentingAccount: $presentingAccount)

Check warning on line 92 in Stronger/Workout/InputForm.swift

View check run for this annotation

Codecov / codecov/patch

Stronger/Workout/InputForm.swift#L92

Added line #L92 was not covered by tests
}
.onChange(of: populateWithPreviousData) {
handleToggleChange(to: populateWithPreviousData)
Expand Down
Loading