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