File tree Expand file tree Collapse file tree 4 files changed +10
-2
lines changed
Sources/StreamChatSwiftUI Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
77- Possibility to customize message reactions top padding (for grid-based reaction containers)
88- Custom sorting of reactions
99- Added a configurable separator view for new messages
10+ - Possibility to customize the cornerRadius of the ` ComposerInputView `
1011
1112# [ 4.26.0] ( https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.26.0 )
1213_ January 16, 2023_
Original file line number Diff line number Diff line change @@ -9,19 +9,22 @@ public struct ComposerConfig {
99
1010 public var inputViewMinHeight : CGFloat
1111 public var inputViewMaxHeight : CGFloat
12+ public var inputViewCornerRadius : CGFloat
1213 public var inputFont : UIFont
1314 public var adjustMessageOnSend : ( String ) -> ( String )
1415 public var adjustMessageOnRead : ( String ) -> ( String )
1516
1617 public init (
1718 inputViewMinHeight: CGFloat = 38 ,
1819 inputViewMaxHeight: CGFloat = 76 ,
20+ inputViewCornerRadius: CGFloat = 20 ,
1921 inputFont: UIFont = UIFont . preferredFont ( forTextStyle: . body) ,
2022 adjustMessageOnSend: @escaping ( String ) -> ( String ) = { $0 } ,
2123 adjustMessageOnRead: @escaping ( String ) -> ( String ) = { $0 }
2224 ) {
2325 self . inputViewMinHeight = inputViewMinHeight
2426 self . inputViewMaxHeight = inputViewMaxHeight
27+ self . inputViewCornerRadius = inputViewCornerRadius
2528 self . inputFont = inputFont
2629 self . adjustMessageOnSend = adjustMessageOnSend
2730 self . adjustMessageOnRead = adjustMessageOnRead
Original file line number Diff line number Diff line change @@ -343,11 +343,11 @@ public struct ComposerInputView<Factory: ViewFactory>: View {
343343 . padding ( . leading, 8 )
344344 . background ( composerInputBackground)
345345 . overlay (
346- RoundedRectangle ( cornerRadius: 20 )
346+ RoundedRectangle ( cornerRadius: TextSizeConstants . cornerRadius )
347347 . stroke ( Color ( colors. innerBorder) )
348348 )
349349 . clipShape (
350- RoundedRectangle ( cornerRadius: 20 )
350+ RoundedRectangle ( cornerRadius: TextSizeConstants . cornerRadius )
351351 )
352352 . accessibilityIdentifier ( " ComposerInputView " )
353353 }
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ struct TextSizeConstants {
1818 static var minThreshold : CGFloat {
1919 composerConfig. inputViewMinHeight
2020 }
21+
22+ static var cornerRadius : CGFloat {
23+ composerConfig. inputViewCornerRadius
24+ }
2125}
2226
2327class InputTextView : UITextView , AccessibilityView {
You can’t perform that action at this time.
0 commit comments