fix: remove page swipe TabView — use tap-only tabs for swipe-to-delete
All checks were successful
Security Checks / dependency-audit (push) Successful in 13s
Security Checks / secret-scanning (push) Successful in 4s
Security Checks / dockerfile-lint (push) Successful in 3s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Yusuf Suleman
2026-04-03 11:37:37 -05:00
parent 2c5311264b
commit 7f549cd6a0

View File

@@ -31,18 +31,17 @@ struct FitnessTabView: View {
.padding(.horizontal)
.padding(.top, 8)
// Content
TabView(selection: $selectedSubTab) {
TodayView()
.tag(0)
TemplatesView()
.tag(1)
GoalsView()
.tag(2)
FoodLibraryView()
.tag(3)
// Content tap tabs to switch (no page swipe, preserves swipe-to-delete)
Group {
switch selectedSubTab {
case 0: TodayView()
case 1: TemplatesView()
case 2: GoalsView()
case 3: FoodLibraryView()
default: TodayView()
}
}
.tabViewStyle(.page(indexDisplayMode: .never))
.animation(.easeInOut(duration: 0.2), value: selectedSubTab)
}
.background(Color.canvas)
.navigationBarHidden(true)