|
|
@ -40,7 +40,6 @@ class OnboardingSearchController: NSViewController { |
|
|
|
super.viewDidLoad() |
|
|
|
super.viewDidLoad() |
|
|
|
|
|
|
|
|
|
|
|
view.wantsLayer = true |
|
|
|
view.wantsLayer = true |
|
|
|
searchResultsDataSource = SearchDataSource(with: searchBar, location: .onboarding) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resultsTableView.isHidden = true |
|
|
|
resultsTableView.isHidden = true |
|
|
|
resultsTableView.delegate = self |
|
|
|
resultsTableView.delegate = self |
|
|
@ -71,6 +70,16 @@ class OnboardingSearchController: NSViewController { |
|
|
|
setupUndoButton() |
|
|
|
setupUndoButton() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override func viewWillAppear() { |
|
|
|
|
|
|
|
super.viewWillAppear() |
|
|
|
|
|
|
|
searchResultsDataSource = SearchDataSource(with: searchBar, location: .onboarding) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override func viewWillDisappear() { |
|
|
|
|
|
|
|
super.viewWillDisappear() |
|
|
|
|
|
|
|
searchResultsDataSource = nil |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
deinit { |
|
|
|
deinit { |
|
|
|
if let themeDidChangeNotif = themeDidChangeNotification { |
|
|
|
if let themeDidChangeNotif = themeDidChangeNotification { |
|
|
|
NotificationCenter.default.removeObserver(themeDidChangeNotif) |
|
|
|
NotificationCenter.default.removeObserver(themeDidChangeNotif) |
|
|
@ -440,7 +449,7 @@ class OnboardingSearchController: NSViewController { |
|
|
|
|
|
|
|
|
|
|
|
extension OnboardingSearchController: NSTableViewDataSource { |
|
|
|
extension OnboardingSearchController: NSTableViewDataSource { |
|
|
|
func numberOfRows(in _: NSTableView) -> Int { |
|
|
|
func numberOfRows(in _: NSTableView) -> Int { |
|
|
|
return searchResultsDataSource.resultsCount() |
|
|
|
return searchResultsDataSource != nil ? searchResultsDataSource.resultsCount() : 0 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func tableView(_ tableView: NSTableView, viewFor _: NSTableColumn?, row: Int) -> NSView? { |
|
|
|
func tableView(_ tableView: NSTableView, viewFor _: NSTableColumn?, row: Int) -> NSView? { |
|
|
|