Replies: 2 comments 4 replies
-
Hey @wltrup! Thanks for the suggestions! I'll see if I can make the About I'm also going to convert this issue into a discussion if you wouldn't mind, as this is not a direct problem with the library. |
Beta Was this translation helpful? Give feedback.
-
I suppose the question is to what extent these In the public struct UIApplicationClient {
public var setUserInterfaceStyle: @Sendable (UIUserInterfaceStyle) async -> Void
}
extension UIApplicationClient: DependencyKey {
public static var liveValue: UIApplicationClient {
return Self(
setUserInterfaceStyle: { userInterfaceStyle in
await MainActor.run {
guard
let scene = UIApplication.shared.connectedScenes.first(
where: { $0 is UIWindowScene }
) as? UIWindowScene
else {
return
}
scene.keyWindow?.overrideUserInterfaceStyle = userInterfaceStyle
}
}
)
}
} So should we expect This question is also important because off the top of my head, there's tons of functionality I'd love to see in a hypothetical dependency like |
Beta Was this translation helpful? Give feedback.
-
Hi Thomas,
I'd like to suggest two additions to your dependencies library:
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions