Fix compile error on tvOS

This commit is contained in:
Davide 2024-11-02 15:27:52 +01:00
parent aba5081450
commit 248f1e7257
No known key found for this signature in database
GPG Key ID: A48836171C759F5E
3 changed files with 8 additions and 20 deletions

View File

@ -99,13 +99,6 @@ extension ThemeWindowModifier {
}
}
extension ThemeNavigationDetailModifier {
func body(content: Content) -> some View {
content
.navigationBarTitleDisplayMode(.inline)
}
}
extension ThemePlainButtonModifier {
func body(content: Content) -> some View {
Button(action: action) {

View File

@ -53,12 +53,6 @@ extension ThemeWindowModifier {
}
}
extension ThemeNavigationDetailModifier {
func body(content: Content) -> some View {
content
}
}
extension ThemePlainButtonModifier {
func body(content: Content) -> some View {
Button(action: action) {

View File

@ -91,15 +91,19 @@ extension View {
modifier(ThemeSectionWithHeaderFooterModifier(header: header, footer: footer))
}
public func themeNavigationDetail() -> some View {
#if os(iOS)
navigationBarTitleDisplayMode(.inline)
#else
self
#endif
}
#if !os(tvOS)
public func themeWindow(width: CGFloat, height: CGFloat) -> some View {
modifier(ThemeWindowModifier(size: .init(width: width, height: height)))
}
public func themeNavigationDetail() -> some View {
modifier(ThemeNavigationDetailModifier())
}
public func themePlainButton(action: @escaping () -> Void) -> some View {
modifier(ThemePlainButtonModifier(action: action))
}
@ -292,9 +296,6 @@ struct ThemeWindowModifier: ViewModifier {
let size: CGSize
}
struct ThemeNavigationDetailModifier: ViewModifier {
}
struct ThemePlainButtonModifier: ViewModifier {
let action: () -> Void
}