fixed bugs for batch3
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
1d1c57d917
commit
575279ab31
@ -22,7 +22,7 @@ class TileletViewController: BaseViewController<Tilelet> {
|
||||
lazy var otherStandardStylePickerSelectorView = {
|
||||
PickerSelectorView(title: "",
|
||||
picker: self.picker,
|
||||
items: Tilelet.SubTitleModel.StandardStyle.allCases.sorted{ $0.rawValue < $1.rawValue })
|
||||
items: Tilelet.SubTitleModel.OtherStandardStyle.allCases.sorted{ $0.rawValue < $1.rawValue })
|
||||
}()
|
||||
|
||||
lazy var subtitleColorPickerSelectorView = {
|
||||
@ -163,7 +163,7 @@ class TileletViewController: BaseViewController<Tilelet> {
|
||||
|
||||
//setup UI
|
||||
surfacePickerSelectorView.text = component.surface.rawValue
|
||||
otherStandardStylePickerSelectorView.text = subTitleModel.standardStyle.rawValue
|
||||
otherStandardStylePickerSelectorView.text = subTitleModel.otherStandardStyle.rawValue
|
||||
titleStandardStylePickerSelectorView.text = titleModel.standardStyle.rawValue
|
||||
subtitleColorPickerSelectorView.text = subTitleModel.textColor.rawValue
|
||||
titleTextField.text = titleModel.text
|
||||
@ -193,7 +193,7 @@ class TileletViewController: BaseViewController<Tilelet> {
|
||||
|
||||
func setSubTitleModel() {
|
||||
if let text = subTitleTextField.text, !text.isEmpty {
|
||||
component.subTitleModel = Tilelet.SubTitleModel(text: text, standardStyle: otherStandardStylePickerSelectorView.selectedItem)
|
||||
component.subTitleModel = Tilelet.SubTitleModel(text: text, otherStandardStyle: otherStandardStylePickerSelectorView.selectedItem)
|
||||
} else {
|
||||
component.subTitleModel = nil
|
||||
}
|
||||
@ -201,7 +201,7 @@ class TileletViewController: BaseViewController<Tilelet> {
|
||||
|
||||
func updateOtherTextStyles() {
|
||||
let items = component.titleLockup.standardStyleConfiguration.configuration(for: titleStandardStylePickerSelectorView.selectedItem.value)!.allOtherStandardStyles
|
||||
let otheritems = items.compactMap { Tilelet.SubTitleModel.StandardStyle(rawValue: $0.rawValue)! }
|
||||
let otheritems = items.compactMap { Tilelet.SubTitleModel.OtherStandardStyle(rawValue: $0.rawValue)! }
|
||||
otherStandardStylePickerSelectorView.items = otheritems
|
||||
otherStandardStylePickerSelectorView.text = otheritems.first?.rawValue ?? ""
|
||||
setSubTitleModel()
|
||||
|
||||
@ -106,7 +106,7 @@ class TitleLockupViewController: BaseViewController<TitleLockup> {
|
||||
//setup UI
|
||||
surfacePickerSelectorView.text = component.surface.rawValue
|
||||
textAlignmentPickerSelectorView.text = TextAlignment.left.rawValue
|
||||
otherStandardStylePickerSelectorView.text = subTitleModel.standardStyle.rawValue
|
||||
otherStandardStylePickerSelectorView.text = subTitleModel.otherStandardStyle.rawValue
|
||||
titleStandardStylePickerSelectorView.text = titleModel.standardStyle.rawValue
|
||||
subtitleColorPickerSelectorView.text = subTitleModel.textColor.rawValue
|
||||
eyebrowTextField.text = eyebrowModel.text
|
||||
@ -139,7 +139,7 @@ class TitleLockupViewController: BaseViewController<TitleLockup> {
|
||||
let style = otherStandardStylePickerSelectorView.selectedItem
|
||||
|
||||
if let text = subTitleTextField.text, !text.isEmpty {
|
||||
component.subTitleModel = TitleLockup.SubTitleModel(text: text, standardStyle: style, textColor: subtitleColorPickerSelectorView.selectedItem)
|
||||
component.subTitleModel = TitleLockup.SubTitleModel(text: text, otherStandardStyle: style, textColor: subtitleColorPickerSelectorView.selectedItem)
|
||||
debug(type: "SubTitle", textStyle: style.value.regular)
|
||||
} else {
|
||||
component.subTitleModel = nil
|
||||
|
||||
Loading…
Reference in New Issue
Block a user