import SwiftUI
+import CloudStorage
struct OutputSettings: View {
- @AppStorage("outputFormats") var outputFormats: OutputFormatSetting = .all
- @AppStorage("frameRate") var frameRate = 10.0
+ @CloudStorage("outputFormats") var outputFormats: OutputFormatSetting = .all
+ @CloudStorage("frameRate") var frameRate = 10.0
+
+ private var anyState: String { "\(outputFormats), \(frameRate)" }
var body: some View {
Form {
}
Spacer()
}
+ .onChange(of: anyState) { _ in
+ NotificationCenter.default.post(name: .reloadConfiguration, object: nil, userInfo: nil)
+ }
}
}