cleanup
This commit is contained in:
parent
52a872f95d
commit
b75f25764f
@ -17,7 +17,7 @@ public class CornerLabelsModel: ParentMoleculeModelProtocol {
|
||||
public var bottomRightLabel: LabelModel?
|
||||
public var molecule: MoleculeModelProtocol?
|
||||
public var children: [MoleculeModelProtocol] {
|
||||
return [topLeftLabel, topRightLabel, bottomLeftLabel, bottomRightLabel].compactMap { (molecule: MoleculeModelProtocol?) in molecule }
|
||||
[molecule, topLeftLabel, topRightLabel, bottomLeftLabel, bottomRightLabel].compactMap { $0 }
|
||||
}
|
||||
|
||||
init(with molecule: MoleculeModelProtocol?) {
|
||||
|
||||
@ -94,16 +94,7 @@ open class NavigationItemModel: NavigationItemModelProtocol, MoleculeModelProtoc
|
||||
|
||||
extension NavigationItemModel: ParentMoleculeModelProtocol {
|
||||
public var children: [MoleculeModelProtocol] {
|
||||
var children: [MoleculeModelProtocol] = []
|
||||
if let line = line {
|
||||
children.append(line)
|
||||
}
|
||||
if let titleView = titleView {
|
||||
children.append(titleView)
|
||||
}
|
||||
if let backButton = backButton {
|
||||
children.append(backButton)
|
||||
}
|
||||
var children: [MoleculeModelProtocol] = [line, titleView, backButton].compactMap { $0 }
|
||||
if let leftButtons = additionalLeftButtons {
|
||||
children.append(contentsOf: leftButtons)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user