mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-24 16:10:41 +01:00
Move nav state ownership to MasterFeedViewController
This commit is contained in:
parent
5f045706e4
commit
188bacee25
@ -40,9 +40,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
|
|||||||
var authorAvatarDownloader: AuthorAvatarDownloader!
|
var authorAvatarDownloader: AuthorAvatarDownloader!
|
||||||
var feedIconDownloader: FeedIconDownloader!
|
var feedIconDownloader: FeedIconDownloader!
|
||||||
|
|
||||||
var navState: NavigationStateController!
|
|
||||||
var masterFeedViewController: MasterFeedViewController!
|
|
||||||
|
|
||||||
var unreadCount = 0 {
|
var unreadCount = 0 {
|
||||||
didSet {
|
didSet {
|
||||||
if unreadCount != oldValue {
|
if unreadCount != oldValue {
|
||||||
@ -70,15 +67,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
|
|||||||
|
|
||||||
registerBackgroundTasks()
|
registerBackgroundTasks()
|
||||||
|
|
||||||
navState = NavigationStateController()
|
|
||||||
|
|
||||||
// Set up the split view
|
// Set up the split view
|
||||||
let splitViewController = window!.rootViewController as! UISplitViewController
|
let splitViewController = window!.rootViewController as! UISplitViewController
|
||||||
|
|
||||||
let feedNavController = splitViewController.viewControllers[0] as! UINavigationController
|
|
||||||
masterFeedViewController = feedNavController.topViewController as? MasterFeedViewController
|
|
||||||
masterFeedViewController.navState = navState
|
|
||||||
|
|
||||||
let detailNavController = splitViewController.viewControllers[splitViewController.viewControllers.count-1] as! UINavigationController
|
let detailNavController = splitViewController.viewControllers[splitViewController.viewControllers.count-1] as! UINavigationController
|
||||||
detailNavController.topViewController!.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem
|
detailNavController.topViewController!.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem
|
||||||
splitViewController.delegate = self
|
splitViewController.delegate = self
|
||||||
|
@ -19,8 +19,8 @@ class MasterFeedViewController: ProgressTableViewController, UndoableCommandRunn
|
|||||||
@IBOutlet private weak var addNewItemButton: UIBarButtonItem!
|
@IBOutlet private weak var addNewItemButton: UIBarButtonItem!
|
||||||
|
|
||||||
var undoableCommands = [UndoableCommand]()
|
var undoableCommands = [UndoableCommand]()
|
||||||
var navState: NavigationStateController!
|
|
||||||
|
|
||||||
|
let navState = NavigationStateController()
|
||||||
override var canBecomeFirstResponder: Bool {
|
override var canBecomeFirstResponder: Bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user