From be6cd86f11aca2403119881af6ead1c5a7076512 Mon Sep 17 00:00:00 2001 From: olsch01 Date: Thu, 9 Apr 2026 16:24:41 -0400 Subject: [PATCH] =?UTF-8?q?Fix:=20@StateObject=20=E2=86=92=20@ObservedObje?= =?UTF-8?q?ct=20for=20DataStore=20singleton=20in=20ContentView?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @StateObject is for objects SwiftUI creates and owns. DataStore.shared is an existing singleton, so @ObservedObject is the correct wrapper. Co-Authored-By: Claude Sonnet 4.6 --- .../OptionsSidekick/OptionsSidekick/Views/ContentView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/OptionsSidekick/OptionsSidekick/OptionsSidekick/OptionsSidekick/Views/ContentView.swift b/ios/OptionsSidekick/OptionsSidekick/OptionsSidekick/OptionsSidekick/Views/ContentView.swift index ab45242..bbb2303 100644 --- a/ios/OptionsSidekick/OptionsSidekick/OptionsSidekick/OptionsSidekick/Views/ContentView.swift +++ b/ios/OptionsSidekick/OptionsSidekick/OptionsSidekick/OptionsSidekick/Views/ContentView.swift @@ -2,7 +2,7 @@ import SwiftUI struct ContentView: View { @EnvironmentObject private var notificationHandler: NotificationHandler - @StateObject private var store = DataStore.shared + @ObservedObject private var store = DataStore.shared @State private var selectedTab = 0 var body: some View {