diff --git a/MealMood/Views/Home/HomeView.swift b/MealMood/Views/Home/HomeView.swift
index 0df222d..f09c21a 100644
--- a/MealMood/Views/Home/HomeView.swift
+++ b/MealMood/Views/Home/HomeView.swift
@@ -153,66 +153,6 @@ struct HomeView: View {
}
}
}
- ToolbarItem(placement: .principal) {
- // Bold circled arrows: the previous thin chevrons were so
- // subtle that users couldn't find how to change week.
- HStack(spacing: 8) {
- if let settings = settings {
- Button {
- viewModel.goToPreviousWeek()
- showWeekLimitUpsell = false
- } label: {
- Image(systemName: "chevron.left")
- .font(.system(size: 13, weight: .bold))
- .foregroundColor(.mealMoodCoral)
- .frame(width: 30, height: 30)
- .background(Circle().fill(Color.white.opacity(0.75)))
- }
- .buttonStyle(.plain)
- .accessibilityLabel(Text("home_previous"))
-
- Button {
- weekPickerDate = viewModel.currentWeekStart
- showWeekPicker = true
- } label: {
- HStack(spacing: 4) {
- Text(viewModel.weekRangeText)
- .font(.mealMoodH2)
- .foregroundColor(.mealMoodTextPrimary)
- .lineLimit(1)
- .minimumScaleFactor(0.7)
- Image(systemName: "chevron.down")
- .font(.system(size: 10, weight: .bold))
- .foregroundColor(.mealMoodTextSecondary)
- }
- }
- .buttonStyle(.plain)
- .accessibilityLabel(Text("home_select_week"))
-
- Button {
- if canNavigateToNextWeek(settings: settings) {
- viewModel.goToNextWeek()
- showWeekLimitUpsell = false
- } else {
- withAnimation(.easeInOut(duration: 0.2)) {
- showWeekLimitUpsell = true
- }
- AnalyticsService.logWeekLimitHit()
- paywallPresentation = PaywallPresentation(source: "week_limit")
- HapticManager.shared.notification(type: .warning)
- }
- } label: {
- Image(systemName: "chevron.right")
- .font(.system(size: 13, weight: .bold))
- .foregroundColor(.mealMoodCoral)
- .frame(width: 30, height: 30)
- .background(Circle().fill(Color.white.opacity(0.75)))
- }
- .buttonStyle(.plain)
- .accessibilityLabel(Text("home_next"))
- }
- }
- }
ToolbarItem(placement: .navigationBarTrailing) {
HStack(spacing: 10) {
if let settings = settings,
@@ -311,9 +251,77 @@ struct HomeView: View {
}
}
+ /// Week switcher. It used to live in the navigation bar's principal slot,
+ /// where a premium user's four leading buttons squeezed it until the arrows
+ /// were clipped away — leaving no visible way to change week.
+ private func weekSwitcher(settings: AppSettings) -> some View {
+ HStack(spacing: 12) {
+ Button {
+ viewModel.goToPreviousWeek()
+ showWeekLimitUpsell = false
+ } label: {
+ Image(systemName: "chevron.left")
+ .font(.system(size: 15, weight: .bold))
+ .foregroundColor(.mealMoodCoral)
+ .frame(width: 36, height: 36)
+ .background(Circle().fill(Color.white))
+ .overlay(Circle().stroke(Color.mealMoodCoral.opacity(0.35), lineWidth: 1))
+ }
+ .buttonStyle(.plain)
+ .accessibilityLabel(Text("home_previous"))
+
+ Button {
+ weekPickerDate = viewModel.currentWeekStart
+ showWeekPicker = true
+ } label: {
+ HStack(spacing: 5) {
+ Text(viewModel.weekRangeText)
+ .font(.mealMoodH2)
+ .foregroundColor(.mealMoodTextPrimary)
+ .lineLimit(1)
+ .minimumScaleFactor(0.7)
+ Image(systemName: "chevron.down")
+ .font(.system(size: 11, weight: .bold))
+ .foregroundColor(.mealMoodTextSecondary)
+ }
+ .frame(maxWidth: .infinity)
+ }
+ .buttonStyle(.plain)
+ .accessibilityLabel(Text("home_select_week"))
+
+ Button {
+ if canNavigateToNextWeek(settings: settings) {
+ viewModel.goToNextWeek()
+ showWeekLimitUpsell = false
+ } else {
+ withAnimation(.easeInOut(duration: 0.2)) {
+ showWeekLimitUpsell = true
+ }
+ AnalyticsService.logWeekLimitHit()
+ paywallPresentation = PaywallPresentation(source: "week_limit")
+ HapticManager.shared.notification(type: .warning)
+ }
+ } label: {
+ Image(systemName: "chevron.right")
+ .font(.system(size: 15, weight: .bold))
+ .foregroundColor(.mealMoodCoral)
+ .frame(width: 36, height: 36)
+ .background(Circle().fill(Color.white))
+ .overlay(Circle().stroke(Color.mealMoodCoral.opacity(0.35), lineWidth: 1))
+ }
+ .buttonStyle(.plain)
+ .accessibilityLabel(Text("home_next"))
+ }
+ .padding(.horizontal, 16)
+ .padding(.top, 6)
+ .padding(.bottom, 10)
+ }
+
@ViewBuilder
private func mainContent(plan: WeekPlan, settings: AppSettings) -> some View {
VStack(spacing: 0) {
+ weekSwitcher(settings: settings)
+
if showWeekLimitUpsell && !settings.isPremium {
PremiumUpsellBanner(
messageKey: "premium_limit_future_weeks",
diff --git a/MealMoodWatchWidget/Info.plist b/MealMoodWatchWidget/Info.plist
index ed571c6..19b3d2a 100644
--- a/MealMoodWatchWidget/Info.plist
+++ b/MealMoodWatchWidget/Info.plist
@@ -17,7 +17,7 @@
CFBundleShortVersionString
2.1.1
CFBundleVersion
- 84
+ 85
NSExtension
NSExtensionPointIdentifier
diff --git a/MealMoodWidget/Info.plist b/MealMoodWidget/Info.plist
index ed571c6..19b3d2a 100644
--- a/MealMoodWidget/Info.plist
+++ b/MealMoodWidget/Info.plist
@@ -17,7 +17,7 @@
CFBundleShortVersionString
2.1.1
CFBundleVersion
- 84
+ 85
NSExtension
NSExtensionPointIdentifier