fix: remove page-swipe TabView — conflicts with swipe-to-delete
All checks were successful
Security Checks / dependency-audit (push) Successful in 14s
Security Checks / secret-scanning (push) Successful in 4s
Security Checks / dockerfile-lint (push) Successful in 3s

Replaced .tabViewStyle(.page) with Group/switch.
Tab switching only via top buttons, no horizontal page swipe.
This prevents swipe-to-delete from accidentally switching tabs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Yusuf Suleman
2026-04-03 11:21:11 -05:00
parent b78e230eda
commit c448b945d5
2 changed files with 13 additions and 20 deletions

View File

@@ -31,18 +31,16 @@ 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 no page swipe (conflicts with swipe-to-delete)
Group {
switch selectedSubTab {
case 0: TodayView()
case 1: TemplatesView()
case 2: GoalsView()
case 3: FoodLibraryView()
default: TodayView()
}
}
.tabViewStyle(.page(indexDisplayMode: .never))
}
.background(Color.canvas)
.navigationBarHidden(true)