Add setting to toggle forecast visibility in charts and dashboard

Adds a "Show Forecast" toggle in Settings > Long-Term Focus section.
When disabled, hides the forecast from the total portfolio card and
removes the prediction chart type from the charts tab.

Fixes #26

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
alexandrev-tibco
2026-02-11 23:56:48 +01:00
parent c99398c350
commit b4615ac558
3 changed files with 8 additions and 3 deletions
@@ -11,6 +11,7 @@ struct DashboardView: View {
@State private var showingCustomize = false
@State private var sectionConfigs = DashboardLayoutStore.load()
@AppStorage("calmModeEnabled") private var calmModeEnabled = true
@AppStorage("showForecast") private var showForecast = true
@State private var pendingAlertDismissed = false
init() {
@@ -165,7 +166,7 @@ struct DashboardView: View {
isPositive: calmModeEnabled
? viewModel.latestPortfolioChange.absolute >= 0
: viewModel.isDayChangePositive,
forecast: viewModel.portfolioForecast,
forecast: showForecast ? viewModel.portfolioForecast : nil,
isPremium: iapService.isPremium,
onUnlockTap: {
viewModel.showingPaywall = true