Skip to content

Commit

Permalink
Fix Xcode 15 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed Jul 9, 2024
1 parent f3e746c commit d3ca166
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ extension View {
/// Puts the parent window's `WindowStateObserver.State` into the environment.
///
/// This makes the state available in child views. It is accessible via the `.windowState` environment key.
@MainActor
public func observeWindowState() -> some View {
modifier(WindowStateObservingModifier())
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/WindowTreatment/WindowStateObservingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public extension EnvironmentValues {
struct WindowStateObservingView<Content: View>: NSViewRepresentable {
private typealias WindowState = WindowStateObserver.State

@State private var windowState: WindowState = .init(window: nil)
@State private var windowState: WindowState = .init()
private let content: Content

init(content: () -> Content) {
Expand Down

0 comments on commit d3ca166

Please sign in to comment.