mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Rename callback: to completion:
This commit is contained in:
@@ -595,19 +595,19 @@ private extension SidebarViewController {
|
||||
return rowView.view(atColumn: 0) as? SidebarCell
|
||||
}
|
||||
|
||||
func applyToAvailableCells(_ callback: (SidebarCell, Node) -> Void) {
|
||||
func applyToAvailableCells(_ completion: (SidebarCell, Node) -> Void) {
|
||||
outlineView.enumerateAvailableRowViews { (rowView: NSTableRowView, row: Int) -> Void in
|
||||
guard let cell = cellForRowView(rowView), let node = nodeForRow(row) else {
|
||||
return
|
||||
}
|
||||
callback(cell, node)
|
||||
completion(cell, node)
|
||||
}
|
||||
}
|
||||
|
||||
func applyToCellsForRepresentedObject(_ representedObject: AnyObject, _ callback: (SidebarCell, Node) -> Void) {
|
||||
func applyToCellsForRepresentedObject(_ representedObject: AnyObject, _ completion: (SidebarCell, Node) -> Void) {
|
||||
applyToAvailableCells { (cell, node) in
|
||||
if node.representsSidebarObject(representedObject) {
|
||||
callback(cell, node)
|
||||
completion(cell, node)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user