Fix some build errors.

This commit is contained in:
Brent Simmons 2017-10-01 11:28:44 -07:00
parent 04612049f5
commit cb4027a951
2 changed files with 5 additions and 3 deletions

View File

@ -24,7 +24,7 @@ import Account
treeController = TreeController(delegate: treeControllerDelegate)
NotificationCenter.default.addObserver(self, selector: #selector(unreadCountDidChange(_:)), name: .UnreadCountDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(folderChildrenDidChange(_:)), name: NSNotification.Name(rawValue: FolderChildrenDidChangeNotification), object: nil)
// NotificationCenter.default.addObserver(self, selector: #selector(folderChildrenDidChange(_:)), name: NSNotification.Name(rawValue: FolderChildrenDidChangeNotification), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(userDidAddFeed(_:)), name: UserDidAddFeedNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(dataModelDidPerformBatchUpdates(_:)), name: .DataModelDidPerformBatchUpdates, object: nil)

View File

@ -120,13 +120,15 @@ public final class Account: DisplayNameProvider, Hashable {
return didAddFeed // TODO
}
public func createFeed(with name: String, editedName: String, url: String) -> Feed {
public func createFeed(with name: String?, editedName: String?, url: String) -> Feed? {
// For syncing, this may need to be an async method with a callback,
// since it will likely need to call the server.
if let feed = existingFeed(withURL: url) {
feed.editedName = editedName
if let editedName = editedName {
feed.editedName = editedName
}
return feed
}