import SwiftUI struct SettingsView: View { @State private var showError: Bool = false @State private var errorMessage: String = "" private let syncService: BackgroundSyncService private let settingsStore = SettingsStore.shared init(syncService: BackgroundSyncService = BackgroundSyncService.shared) { self.syncService = syncService } var body: some View { Form { Section(header: Text("Sync Settings")) { Button("Sync Now") { syncNow() } .disabled(syncService.isSyncing) if syncService.isSyncing { ProgressView("Syncing...") } Text("Sync interval is managed in BackgroundSyncService") .foregroundColor(.secondary) } Section(header: Text("Appearance")) { Text("Appearance settings are managed in ReadingPreferences") .foregroundColor(.secondary) } Section(header: Text("Notifications")) { Text("Notification preferences are managed in NotificationPreferences") .foregroundColor(.secondary) } Section(header: Text("About")) { Text("RSSuper") .font(.headline) Text("Version 1.0") .foregroundColor(.secondary) Link("GitHub", destination: URL(string: "https://github.com/rssuper/rssuper")!) Link("Privacy Policy", destination: URL(string: "https://rssuper.example.com/privacy")!) } } .navigationTitle("Settings") .alert("Error", isPresented: $showError) { Button("OK", role: .cancel) { errorMessage = "" } } message: { Text(errorMessage) } .onAppear { // Load settings from SettingsStore } } private func syncNow() { syncService.forceSync() } } #Preview { SettingsView() }