Skip to content

Commit 0107e49

Browse files
committed
fixing multi-OS builds
1 parent 8dc2eee commit 0107e49

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

Sources/RadiantKit/ViewExtensions/SingleWindowView.swift

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
}
6363

6464
#if os(macOS) || os(iOS) || os(visionOS)
65+
6566
extension WindowGroup {
6667
/// Initializes a new instance of the `WindowGroup` with a single window
6768
/// view.
@@ -76,5 +77,17 @@
7677
}
7778
}
7879
}
79-
#endif
80+
#else
81+
extension WindowGroup {
82+
/// Initializes a new instance of the `WindowGroup` with a single window
83+
/// view.
84+
/// - Parameter _: The type of the `SingleWindowView`.
85+
@MainActor
86+
public init(singleOf _: Content.Type) where Content : SingleWindowView {
87+
self.init {
88+
Content()
89+
}
90+
}
91+
}
92+
#endif
8093
#endif

Sources/RadiantProgress/ProgressOperationProperties.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// OTHER DEALINGS IN THE SOFTWARE.
2828
//
2929

30-
#if canImport(Observation) && (os(macOS) || os(iOS))
30+
#if canImport(Observation)
3131

3232
public import Foundation
3333

0 commit comments

Comments
 (0)