added isEqual to Toggle
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
878fd11c8a
commit
db8ba63892
@ -111,4 +111,31 @@ public class ToggleModel: FormFieldModel {
|
|||||||
try container.encode(textWeight, forKey: .textWeight)
|
try container.encode(textWeight, forKey: .textWeight)
|
||||||
try container.encode(textPosition, forKey: .textPosition)
|
try container.encode(textPosition, forKey: .textPosition)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open override func isEqual(to model: any ModelComparisonProtocol) -> Bool {
|
||||||
|
guard super.isEqual(to: model), let model = model as? Self else { return false }
|
||||||
|
return selected == model.selected
|
||||||
|
&& animated == model.animated
|
||||||
|
&& action.isEqual(to: model.action)
|
||||||
|
&& alternateAction.isEqual(to: model.alternateAction)
|
||||||
|
&& accessibilityText == model.accessibilityText
|
||||||
|
&& showText == model.showText
|
||||||
|
&& onText == model.onText
|
||||||
|
&& offText == model.offText
|
||||||
|
&& textSize == model.textSize
|
||||||
|
&& textWeight == model.textWeight
|
||||||
|
&& textPosition == model.textPosition
|
||||||
|
}
|
||||||
|
|
||||||
|
open override func isVisuallyEquivalent(to model: any MoleculeModelComparisonProtocol) -> Bool {
|
||||||
|
guard super.isVisuallyEquivalent(to: model), let model = model as? Self else { return false }
|
||||||
|
return selected == model.selected
|
||||||
|
&& animated == model.animated
|
||||||
|
&& accessibilityText == model.accessibilityText
|
||||||
|
&& showText == model.showText
|
||||||
|
&& onText == model.onText
|
||||||
|
&& offText == model.offText
|
||||||
|
&& textSize == model.textSize
|
||||||
|
&& textWeight == model.textWeight
|
||||||
|
&& textPosition == model.textPosition }
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user