Continue fixing build errors.
This commit is contained in:
parent
c0ce68e64b
commit
6631a9c2f8
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ class AddFolderWindowController : NSWindowController {
|
|||
return
|
||||
}
|
||||
|
||||
let _ = account.ensureFolderWithName(folderName)
|
||||
let _ = account.ensureFolder(with: folderName)
|
||||
}
|
||||
|
||||
// MARK: Actions
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue