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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user