From 5fdbd4b9d0c1d7c538fcc8380aba756026342ef6 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sat, 31 Oct 2020 17:31:48 -0500 Subject: [PATCH] Fixed misleading variable name --- .../Sidebar/SidebarOutlineDataSource.swift | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift b/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift index df593b664..fe244ac27 100644 --- a/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift +++ b/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift @@ -631,63 +631,63 @@ private extension SidebarOutlineDataSource { return false } - func violatesAccountSpecificBehavior(_ parentNode: Node, _ draggedFeed: PasteboardWebFeed) -> Bool { - return violatesAccountSpecificBehavior(parentNode, Set([draggedFeed])) + func violatesAccountSpecificBehavior(_ dropTargetNode: Node, _ draggedFeed: PasteboardWebFeed) -> Bool { + return violatesAccountSpecificBehavior(dropTargetNode, Set([draggedFeed])) } - func violatesAccountSpecificBehavior(_ parentNode: Node, _ draggedFeeds: Set) -> Bool { - if violatesDisallowFeedInRootFolder(parentNode) { + func violatesAccountSpecificBehavior(_ dropTargetNode: Node, _ draggedFeeds: Set) -> Bool { + if violatesDisallowFeedInRootFolder(dropTargetNode) { return true } - if violatesDisallowFeedCopyInRootFolder(parentNode, draggedFeeds) { + if violatesDisallowFeedCopyInRootFolder(dropTargetNode, draggedFeeds) { return true } - if violatesDisallowFeedInMultipleFolders(parentNode, draggedFeeds) { + if violatesDisallowFeedInMultipleFolders(dropTargetNode, draggedFeeds) { return true } return false } - func violatesDisallowFeedInRootFolder(_ parentNode: Node) -> Bool { - guard let parentAccount = nodeAccount(parentNode), parentAccount.behaviors.contains(.disallowFeedInRootFolder) else { + func violatesDisallowFeedInRootFolder(_ dropTargetNode: Node) -> Bool { + guard let parentAccount = nodeAccount(dropTargetNode), parentAccount.behaviors.contains(.disallowFeedInRootFolder) else { return false } - if parentNode.representedObject is Account { + if dropTargetNode.representedObject is Account { return true } return false } - func violatesDisallowFeedCopyInRootFolder(_ parentNode: Node, _ draggedFeeds: Set) -> Bool { - guard let parentAccount = nodeAccount(parentNode), parentAccount.behaviors.contains(.disallowFeedCopyInRootFolder) else { + func violatesDisallowFeedCopyInRootFolder(_ dropTargetNode: Node, _ draggedFeeds: Set) -> Bool { + guard let dropTargetAccount = nodeAccount(dropTargetNode), dropTargetAccount.behaviors.contains(.disallowFeedCopyInRootFolder) else { return false } for draggedFeed in draggedFeeds { - if parentAccount.accountID != draggedFeed.accountID { + if dropTargetAccount.accountID != draggedFeed.accountID { return false } } - if parentNode.representedObject is Account && (NSApplication.shared.currentEvent?.modifierFlags.contains(.option) ?? false) { + if dropTargetNode.representedObject is Account && (NSApplication.shared.currentEvent?.modifierFlags.contains(.option) ?? false) { return true } return false } - func violatesDisallowFeedInMultipleFolders(_ parentNode: Node, _ draggedFeeds: Set) -> Bool { - guard let parentAccount = nodeAccount(parentNode), parentAccount.behaviors.contains(.disallowFeedInMultipleFolders) else { + func violatesDisallowFeedInMultipleFolders(_ dropTargetNode: Node, _ draggedFeeds: Set) -> Bool { + guard let dropTargetAccount = nodeAccount(dropTargetNode), dropTargetAccount.behaviors.contains(.disallowFeedInMultipleFolders) else { return false } for draggedFeed in draggedFeeds { - if parentAccount.hasWebFeed(withURL: draggedFeed.url) { + if dropTargetAccount.hasWebFeed(withURL: draggedFeed.url) { return true } }