Fix crashing bug. Now the app window appears! Without any data in it, sure, but hey.

This commit is contained in:
Brent Simmons 2017-10-05 13:15:32 -07:00
parent b8f69779ed
commit 33e6e72d21
1 changed files with 2 additions and 5 deletions

View File

@ -14,15 +14,12 @@ import Account
@objc class SidebarViewController: NSViewController, NSOutlineViewDelegate, NSOutlineViewDataSource { @objc class SidebarViewController: NSViewController, NSOutlineViewDelegate, NSOutlineViewDataSource {
@IBOutlet var outlineView: NSOutlineView! @IBOutlet var outlineView: NSOutlineView!
var treeController: TreeController! let treeController = TreeController(delegate: SidebarTreeControllerDelegate())
let treeControllerDelegate = SidebarTreeControllerDelegate()
//MARK: NSViewController //MARK: NSViewController
override func viewDidLoad() { override func viewDidLoad() {
treeController = TreeController(delegate: treeControllerDelegate)
NotificationCenter.default.addObserver(self, selector: #selector(unreadCountDidChange(_:)), name: .UnreadCountDidChange, object: nil) 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(userDidAddFeed(_:)), name: UserDidAddFeedNotification, object: nil)