Skip to content

Commit de41f48

Browse files
Possibility to turn off tab bar handling in the message list
1 parent fe4b22e commit de41f48

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
88
- Custom sorting of reactions
99
- Added a configurable separator view for new messages
1010
- Possibility to customize the cornerRadius of the `ComposerInputView`
11+
- Possibility to turn off tab bar handling in the message list
1112

1213
### 🐞 Fixed
1314
- Message List layout for iPad in Slide Over mode

Sources/StreamChatSwiftUI/ChatChannel/ChatChannelView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public struct ChatChannelView<Factory: ViewFactory>: View, KeyboardReadable {
171171
isIphone ?
172172
Color.clear.background(
173173
TabBarAccessor { _ in
174-
self.tabBarAvailable = true
174+
self.tabBarAvailable = utils.messageListConfig.handleTabBarVisibility
175175
}
176176
)
177177
.allowsHitTesting(false)

Sources/StreamChatSwiftUI/ChatChannel/MessageList/MessageListConfig.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public struct MessageListConfig {
2424
cacheSizeOnChatDismiss: Int = 1024 * 1024 * 100,
2525
iPadSplitViewEnabled: Bool = true,
2626
scrollingAnchor: UnitPoint = .bottom,
27-
showNewMessagesSeparator: Bool = false
27+
showNewMessagesSeparator: Bool = false,
28+
handleTabBarVisibility: Bool = true
2829
) {
2930
self.messageListType = messageListType
3031
self.typingIndicatorPlacement = typingIndicatorPlacement
@@ -42,6 +43,7 @@ public struct MessageListConfig {
4243
self.iPadSplitViewEnabled = iPadSplitViewEnabled
4344
self.scrollingAnchor = scrollingAnchor
4445
self.showNewMessagesSeparator = showNewMessagesSeparator
46+
self.handleTabBarVisibility = handleTabBarVisibility
4547
}
4648

4749
public let messageListType: MessageListType
@@ -60,6 +62,7 @@ public struct MessageListConfig {
6062
public let iPadSplitViewEnabled: Bool
6163
public let scrollingAnchor: UnitPoint
6264
public let showNewMessagesSeparator: Bool
65+
public let handleTabBarVisibility: Bool
6366
}
6467

6568
/// Contains information about the message paddings.

0 commit comments

Comments
 (0)