removed duplicate struct for view masking protocol
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
344b2f18aa
commit
c794add84d
@ -148,25 +148,28 @@ open class TextViewEntryField: VDS.TextArea, VDSMoleculeViewProtocol, ObservingT
|
||||
}
|
||||
|
||||
switch viewModel.type {
|
||||
case .secure, .password:
|
||||
case .secure:
|
||||
textView.isSecureTextEntry = true
|
||||
textView.shouldMaskWhileRecording = true
|
||||
|
||||
|
||||
case .numberSecure:
|
||||
textView.isSecureTextEntry = true
|
||||
textView.keyboardType = .numberPad
|
||||
textView.shouldMaskWhileRecording = true
|
||||
|
||||
case .number:
|
||||
textView.keyboardType = .numberPad
|
||||
|
||||
case .email:
|
||||
textView.keyboardType = .emailAddress
|
||||
//uncomment out once inputField branch is merged and update this logic
|
||||
// case .securityCode, .creditCard:
|
||||
// textView.shouldMaskWhileRecording = true
|
||||
|
||||
default: break
|
||||
|
||||
case .securityCode, .creditCard, .password:
|
||||
textView.shouldMaskWhileRecording = true
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Override the preset keyboard set in type.
|
||||
if let keyboardType = viewModel.assignKeyboardType() {
|
||||
textView.keyboardType = keyboardType
|
||||
}
|
||||
|
||||
/// append any internal rules:
|
||||
@ -229,10 +232,6 @@ open class TextViewEntryField: VDS.TextArea, VDSMoleculeViewProtocol, ObservingT
|
||||
open func updateView(_ size: CGFloat) {}
|
||||
}
|
||||
|
||||
internal struct ViewMasking {
|
||||
static var shouldMaskWhileRecording: UInt8 = 0
|
||||
}
|
||||
|
||||
extension VDS.TextView: ViewMaskingProtocol {
|
||||
public var shouldMaskWhileRecording: Bool {
|
||||
get {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user