mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
♻️ Moves timeline fix to scene coordinator
This commit is contained in:
committed by
Brent Simmons
parent
8eee73cf26
commit
7ea9ce509b
@@ -60,9 +60,6 @@ class MainTimelineViewController: UITableViewController, UndoableCommandRunner {
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(displayNameDidChange), name: .DisplayNameDidChange, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil)
|
||||
|
||||
// Split View Controller Delegate
|
||||
splitViewController?.delegate = self
|
||||
|
||||
// Initialize Programmatic Buttons
|
||||
filterButton = UIBarButtonItem(image: AppAssets.filterInactiveImage, style: .plain, target: self, action: #selector(toggleFilter(_:)))
|
||||
firstUnreadButton = UIBarButtonItem(image: AppAssets.nextUnreadArticleImage, style: .plain, target: self, action: #selector(firstUnread(_:)))
|
||||
@@ -603,39 +600,6 @@ extension MainTimelineViewController: UISearchBarDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
extension TimelineViewController: UISplitViewControllerDelegate {
|
||||
|
||||
func splitViewController(_ svc: UISplitViewController, willChangeTo displayMode: UISplitViewController.DisplayMode) {
|
||||
switch displayMode {
|
||||
case .automatic:
|
||||
return
|
||||
case .secondaryOnly:
|
||||
return
|
||||
case .oneBesideSecondary:
|
||||
// Timeline + Article - show the refresh control on the timeline
|
||||
self.toolbarItems?[2].customView?.alpha = 1.0
|
||||
case .oneOverSecondary:
|
||||
return
|
||||
case .twoBesideSecondary:
|
||||
return
|
||||
case .twoOverSecondary:
|
||||
return
|
||||
case .twoDisplaceSecondary:
|
||||
// Sidebar + Timeline + Article - hide the refresh control on the timeline
|
||||
self.toolbarItems?[2].customView?.alpha = 0.0
|
||||
case .primaryHidden:
|
||||
return
|
||||
case .allVisible:
|
||||
return
|
||||
case .primaryOverlay:
|
||||
return
|
||||
@unknown default:
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private extension MainTimelineViewController {
|
||||
|
||||
Reference in New Issue
Block a user