UI changes

This commit is contained in:
Trey t
2024-12-19 21:57:59 -06:00
parent b268a271fd
commit 85ef3d58c6
19 changed files with 268 additions and 184 deletions

View File

@@ -25,17 +25,19 @@ struct AllWorkoutsListView: View {
var body: some View {
VStack {
if let filteredRegisterdUser = filteredRegisterdUser {
Text((filteredRegisterdUser.firstName ?? "NA") + "'s Workouts")
VStack {
if let filteredRegisterdUser = filteredRegisterdUser {
Text((filteredRegisterdUser.firstName ?? "NA") + "'s Workouts")
}
FilterAllView(searchString: $searchString,
uniqueWorkoutUsers: $uniqueWorkoutUsers,
filteredRegisterdUser: $filteredRegisterdUser,
filteredWorkouts: $filteredWorkouts,
workouts: $workouts,
currentSort: $currentSort)
}
FilterAllView(searchString: $searchString,
uniqueWorkoutUsers: $uniqueWorkoutUsers,
filteredRegisterdUser: $filteredRegisterdUser,
filteredWorkouts: $filteredWorkouts,
workouts: $workouts,
currentSort: $currentSort)
ScrollView {
LazyVStack(spacing: 10) {
ForEach(filteredWorkouts, id:\.id) { workout in
@@ -48,6 +50,7 @@ struct AllWorkoutsListView: View {
}
}
}
.background(Color(uiColor: .systemBackground))
.refreshable {
refresh()
}

View File

@@ -63,7 +63,6 @@ struct AllWorkoutsView: View {
selectedWorkout = bridgeModule.currentWorkoutInfo.workout
})
switch selectedSegment {
case .AllWorkout:
if isUpdating {
@@ -79,6 +78,7 @@ struct AllWorkoutsView: View {
self.needsUpdating = true
maybeUpdateShit()
})
Divider()
case .MyWorkouts:
PlannedWorkoutView(workouts: UserStore.shared.plannedWorkouts,
@@ -88,7 +88,9 @@ struct AllWorkoutsView: View {
} else {
ProgressView("Updating")
}
}.onAppear{
}
.background(Color(uiColor: .systemGray5))
.onAppear{
// UserStore.shared.logout()
authorizeHealthKit()
maybeUpdateShit()