File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
Sources/StreamChatSwiftUI Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,10 @@ public struct ChatThreadListView<Factory: ViewFactory>: View {
7272 )
7373 }
7474 }
75+ . accentColor ( colors. tintColor)
76+ . background (
77+ viewFactory. makeThreadListBackground ( colors: colors)
78+ )
7579 . modifier ( viewFactory. makeThreadListHeaderViewModifier ( title: title) )
7680 . onAppear {
7781 if !viewModel. hasLoadedThreads {
Original file line number Diff line number Diff line change @@ -1003,6 +1003,11 @@ extension ViewFactory {
10031003 ChatThreadListHeaderViewModifier ( title: title)
10041004 }
10051005
1006+ public func makeThreadListBackground( colors: ColorPalette ) -> some View {
1007+ Color ( colors. background)
1008+ . edgesIgnoringSafeArea ( . bottom)
1009+ }
1010+
10061011 public func makeThreadListModifier( ) -> some ViewModifier {
10071012 EmptyViewModifier ( )
10081013 }
Original file line number Diff line number Diff line change @@ -1019,6 +1019,12 @@ public protocol ViewFactory: AnyObject {
10191019 /// Returns a view modifier applied to the thread list.
10201020 func makeThreadListModifier( ) -> ThreadListModifier
10211021
1022+ associatedtype ThreadListBackground : View
1023+ /// Creates the background for the thread list.
1024+ /// - Parameter colors: The colors palette used in the SDK.
1025+ /// - Returns: The view shown as a background of the thread list.
1026+ func makeThreadListBackground( colors: ColorPalette ) -> ThreadListBackground
1027+
10221028 associatedtype ThreadListDividerItem : View
10231029 /// Creates the thread list divider item.
10241030 func makeThreadListDividerItem( ) -> ThreadListDividerItem
You can’t perform that action at this time.
0 commit comments