mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Use a text view in the join open group screen
This commit is contained in:
parent
c46099735d
commit
fb9a27df90
1 changed files with 6 additions and 6 deletions
|
@ -205,8 +205,8 @@ private final class EnterURLVC : UIViewController, UIGestureRecognizerDelegate,
|
|||
weak var joinOpenGroupVC: JoinOpenGroupVC!
|
||||
|
||||
// MARK: Components
|
||||
private lazy var urlTextField: TextField = {
|
||||
let result = TextField(placeholder: NSLocalizedString("vc_enter_chat_url_text_field_hint", comment: ""))
|
||||
private lazy var urlTextView: TextView = {
|
||||
let result = TextView(placeholder: NSLocalizedString("vc_enter_chat_url_text_field_hint", comment: ""))
|
||||
result.keyboardType = .URL
|
||||
result.autocapitalizationType = .none
|
||||
result.autocorrectionType = .no
|
||||
|
@ -244,10 +244,10 @@ private final class EnterURLVC : UIViewController, UIGestureRecognizerDelegate,
|
|||
// Stack view
|
||||
let stackView: UIStackView
|
||||
if Features.useV2OpenGroups {
|
||||
stackView = UIStackView(arrangedSubviews: [ urlTextField, UIView.spacer(withHeight: Values.mediumSpacing), suggestionGridTitleLabel,
|
||||
stackView = UIStackView(arrangedSubviews: [ urlTextView, UIView.spacer(withHeight: Values.mediumSpacing), suggestionGridTitleLabel,
|
||||
UIView.spacer(withHeight: Values.mediumSpacing), suggestionGrid, UIView.vStretchingSpacer(), nextButtonContainer ])
|
||||
} else {
|
||||
stackView = UIStackView(arrangedSubviews: [ urlTextField, UIView.vStretchingSpacer(), nextButtonContainer ])
|
||||
stackView = UIStackView(arrangedSubviews: [ urlTextView, UIView.vStretchingSpacer(), nextButtonContainer ])
|
||||
}
|
||||
stackView.axis = .vertical
|
||||
stackView.alignment = .fill
|
||||
|
@ -269,7 +269,7 @@ private final class EnterURLVC : UIViewController, UIGestureRecognizerDelegate,
|
|||
}
|
||||
|
||||
@objc private func dismissKeyboard() {
|
||||
urlTextField.resignFirstResponder()
|
||||
urlTextView.resignFirstResponder()
|
||||
}
|
||||
|
||||
// MARK: Interaction
|
||||
|
@ -283,7 +283,7 @@ private final class EnterURLVC : UIViewController, UIGestureRecognizerDelegate,
|
|||
}
|
||||
|
||||
@objc private func joinOpenGroup() {
|
||||
let url = urlTextField.text?.trimmingCharacters(in: .whitespaces) ?? ""
|
||||
let url = urlTextView.text?.trimmingCharacters(in: .whitespaces) ?? ""
|
||||
joinOpenGroupVC.joinOpenGroup(with: url)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue