Remove indent attribute as we should have been using indentionLevel.

This commit is contained in:
Maurice Parker 2019-04-20 11:11:09 -05:00
parent a4b30793a8
commit f01517d184
2 changed files with 4 additions and 10 deletions

View File

@ -32,14 +32,6 @@ class MasterTableViewCell : UITableViewCell {
}
}
var indent = false {
didSet {
if indent != oldValue {
setNeedsLayout()
}
}
}
var disclosureExpanded = false {
didSet {
updateDisclosureImage()
@ -120,7 +112,7 @@ class MasterTableViewCell : UITableViewCell {
override func layoutSubviews() {
super.layoutSubviews()
let layout = MasterTableViewCellLayout(cellSize: bounds.size, shouldShowImage: shouldShowImage, label: titleView, unreadCountView: unreadCountView, showingEditingControl: showingEditControl, indent: indent, shouldShowDisclosure: !showsReorderControl)
let layout = MasterTableViewCellLayout(cellSize: bounds.size, shouldShowImage: shouldShowImage, label: titleView, unreadCountView: unreadCountView, showingEditingControl: showingEditControl, indent: indentationLevel == 1, shouldShowDisclosure: !showsReorderControl)
layoutWith(layout)
}

View File

@ -487,7 +487,9 @@ class MasterViewController: UITableViewController, UndoableCommandRunner {
func configure(_ cell: MasterTableViewCell, _ node: Node) {
cell.delegate = self
cell.indent = node.parent?.representedObject is Folder
if node.parent?.representedObject is Folder {
cell.indentationLevel = 1
}
cell.disclosureExpanded = expandedNodes.contains(node)
cell.allowDisclosureSelection = node.canHaveChildNodes