Continue fixing build errors.

This commit is contained in:
Brent Simmons 2017-09-17 13:07:55 -07:00
parent c0ce68e64b
commit 6631a9c2f8
5 changed files with 18 additions and 4 deletions

View File

@ -66,7 +66,7 @@ public final class ArticleStylesManager {
updateStyleNames()
updateCurrentStyle()
NotificationCenter.default.addObserver(self, selector: #selector(applicationDidBecomeActive(_:)), name: NSNotification.Name.NSApplicationDidBecomeActiveNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(applicationDidBecomeActive(_:)), name: NSApplication.didBecomeActiveNotification, object: nil)
}
// MARK: Notifications

View File

@ -63,7 +63,7 @@ class AddFeedController: AddFeedWindowControllerDelegate, FeedFinderDelegate {
assert(folder.account != nil, "Folder must have an account.")
let account = folder.account ?? AccountManager.sharedInstance.localAccount
if account.hasFeedWithURLString(url.absoluteString) {
if account.hasFeed(withURL: url.absoluteString) {
showAlreadySubscribedError(url.absoluteString, folder)
return
}
@ -160,7 +160,7 @@ private extension AddFeedController {
return
}
if account.hasFeedWithURLString(feedURLString) {
if account.hasFeed(withURL: feedURLString) {
showAlreadySubscribedError(feedURLString, folder)
return
}

View File

@ -68,7 +68,7 @@ class AddFolderWindowController : NSWindowController {
return
}
let _ = account.ensureFolderWithName(folderName)
let _ = account.ensureFolder(with: folderName)
}
// MARK: Actions

View File

@ -70,6 +70,11 @@ public final class Account: DisplayNameProvider, Hashable {
// TODO
}
public func ensureFolder(with name: String) -> Folder? {
return nil //TODO
}
// MARK: - Equatable
public class func ==(lhs: Account, rhs: Account) -> Bool {

View File

@ -24,6 +24,7 @@ public protocol Container {
func flattenedFeeds() -> Set<Feed>
func existingFeed(with feedID: String) -> Feed?
func existingFeed(withURL url: String) -> Feed?
func hasFeed(withURL url: String) -> Bool
func isChild(_ obj: AnyObject) -> Bool
@ -64,6 +65,14 @@ public extension Container {
return foundObject as! Feed?
}
func hasFeed(withURL url: String) -> Bool {
if let _ = existingFeed(withURL: url) {
return true
}
return false
}
func visitChildren(visitBlock: VisitBlock) -> Bool {
return visitObjects(false, visitBlock)