diff --git a/yobble/Views/Chat/PrivateChatView.swift b/yobble/Views/Chat/PrivateChatView.swift index 2c0b90d..d440e23 100644 --- a/yobble/Views/Chat/PrivateChatView.swift +++ b/yobble/Views/Chat/PrivateChatView.swift @@ -7,6 +7,8 @@ struct PrivateChatView: View { let chat: PrivateChatListItem let currentUserId: String? private let bottomAnchorId = "PrivateChatBottomAnchor" + + let lineLimitInChat = 6 @StateObject private var viewModel: PrivateChatViewModel @State private var hasPositionedToBottom: Bool = false @@ -247,9 +249,9 @@ struct PrivateChatView: View { ZStack(alignment: .bottomTrailing) { Group { - if #available(iOS 160.0, *) { + if #available(iOS 16.0, *) { TextField(inputTab.placeholder, text: $draftText, axis: .vertical) - .lineLimit(1...4) + .lineLimit(1...lineLimitInChat) .focused($isComposerFocused) .submitLabel(.send) .disabled(currentUserId == nil) @@ -263,8 +265,8 @@ struct PrivateChatView: View { set: { isComposerFocused = $0 } ), isEnabled: currentUserId != nil, - minHeight: 40, - maxLines: 4, + minHeight: 10, + maxLines: lineLimitInChat, calculatedHeight: $legacyComposerHeight, onSubmit: sendCurrentMessage )