Skip to content

Commit a9084a7

Browse files
Fix tabbar hidding the composer in the demo app (#724)
1 parent 1effcd5 commit a9084a7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

DemoAppSwiftUI/ChannelHeader/NewChatView.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ struct NewChatView: View, KeyboardReadable {
9292
viewFactory: DemoAppFactory.shared,
9393
channelController: controller
9494
)
95+
.modifier(TabBarVisibilityModifier())
9596
} else {
9697
Spacer()
9798
}
@@ -104,6 +105,19 @@ struct NewChatView: View, KeyboardReadable {
104105
}
105106
}
106107

108+
struct TabBarVisibilityModifier: ViewModifier {
109+
110+
func body(content: Content) -> some View {
111+
if #available(iOS 18, *) {
112+
content.toolbarVisibility(.hidden, for: .bottomBar)
113+
} else if #available(iOS 16.0, *) {
114+
content.toolbar(.hidden, for: .bottomBar)
115+
} else {
116+
content
117+
}
118+
}
119+
}
120+
107121
struct SelectedUserView: View {
108122

109123
@Injected(\.colors) var colors

0 commit comments

Comments
 (0)