removed duplicate struct for view masking protocol

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-07-30 13:44:03 -05:00
parent 344b2f18aa
commit c794add84d

View File

@ -148,25 +148,28 @@ open class TextViewEntryField: VDS.TextArea, VDSMoleculeViewProtocol, ObservingT
} }
switch viewModel.type { switch viewModel.type {
case .secure, .password: case .secure:
textView.isSecureTextEntry = true textView.isSecureTextEntry = true
textView.shouldMaskWhileRecording = true textView.shouldMaskWhileRecording = true
case .numberSecure: case .numberSecure:
textView.isSecureTextEntry = true textView.isSecureTextEntry = true
textView.keyboardType = .numberPad
textView.shouldMaskWhileRecording = true textView.shouldMaskWhileRecording = true
case .number:
textView.keyboardType = .numberPad textView.keyboardType = .numberPad
case .email: case .email:
textView.keyboardType = .emailAddress 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: /// append any internal rules:
@ -229,10 +232,6 @@ open class TextViewEntryField: VDS.TextArea, VDSMoleculeViewProtocol, ObservingT
open func updateView(_ size: CGFloat) {} open func updateView(_ size: CGFloat) {}
} }
internal struct ViewMasking {
static var shouldMaskWhileRecording: UInt8 = 0
}
extension VDS.TextView: ViewMaskingProtocol { extension VDS.TextView: ViewMaskingProtocol {
public var shouldMaskWhileRecording: Bool { public var shouldMaskWhileRecording: Bool {
get { get {