mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Restore Go To Feed menu item.
This commit is contained in:
@@ -840,25 +840,8 @@ private extension MainTimelineViewController {
|
||||
return action
|
||||
}
|
||||
|
||||
private func canGoToFeed() -> Bool {
|
||||
// This is temporary — since we haven’t figured out
|
||||
// <https://github.com/Ranchero-Software/NetNewsWire/issues/4452>
|
||||
// on compact size classes, just don’t display this option
|
||||
// when on compact.
|
||||
|
||||
var viewController: UIViewController? = self
|
||||
while viewController != nil {
|
||||
if let splitViewController = viewController?.splitViewController {
|
||||
return splitViewController.traitCollection.horizontalSizeClass == .regular
|
||||
}
|
||||
viewController = parent
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func discloseFeedAction(_ article: Article) -> UIAction? {
|
||||
guard canGoToFeed(), let webFeed = article.webFeed,
|
||||
guard let webFeed = article.webFeed,
|
||||
!coordinator.timelineFeedIsEqualTo(webFeed) else { return nil }
|
||||
|
||||
let title = NSLocalizedString("Go to Feed", comment: "Go to Feed")
|
||||
@@ -869,7 +852,7 @@ private extension MainTimelineViewController {
|
||||
}
|
||||
|
||||
func discloseFeedAlertAction(_ article: Article, completion: @escaping (Bool) -> Void) -> UIAlertAction? {
|
||||
guard canGoToFeed(), let webFeed = article.webFeed,
|
||||
guard let webFeed = article.webFeed,
|
||||
!coordinator.timelineFeedIsEqualTo(webFeed) else { return nil }
|
||||
|
||||
let title = NSLocalizedString("Go to Feed", comment: "Go to Feed")
|
||||
|
||||
@@ -1089,12 +1089,18 @@ class SceneCoordinator: NSObject, UndoableCommandRunner {
|
||||
self.treeControllerDelegate.addFilterException(parentFolderFeedID)
|
||||
}
|
||||
|
||||
rebuildBackingStores(initialLoad: initialLoad, completion: {
|
||||
rebuildBackingStores(initialLoad: initialLoad) {
|
||||
self.treeControllerDelegate.resetFilterExceptions()
|
||||
self.selectFeed(nil) {
|
||||
self.selectFeed(webFeed, animations: animations, completion: completion)
|
||||
if self.rootSplitViewController.traitCollection.horizontalSizeClass == .compact {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
||||
self.selectFeed(webFeed, animations: animations, completion: completion)
|
||||
}
|
||||
} else {
|
||||
self.selectFeed(webFeed, animations: animations, completion: completion)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func showStatusBar() {
|
||||
|
||||
Reference in New Issue
Block a user