mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Disable navigation for selectPrevUnread and selectNextUnread
This commit is contained in:
@@ -25,6 +25,11 @@ class RootSplitViewController: UISplitViewController {
|
||||
coordinator.resetFocus()
|
||||
}
|
||||
|
||||
override func show(_ column: UISplitViewController.Column) {
|
||||
guard !coordinator.isNavigationDisabled else { return }
|
||||
super.show(column)
|
||||
}
|
||||
|
||||
// MARK: Keyboard Shortcuts
|
||||
|
||||
@objc func scrollOrGoToNextUnread(_ sender: Any?) {
|
||||
|
||||
@@ -127,6 +127,8 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, Logging {
|
||||
return activity
|
||||
}
|
||||
|
||||
var isNavigationDisabled = false
|
||||
|
||||
var isRootSplitCollapsed: Bool {
|
||||
return rootSplitViewController.isCollapsed
|
||||
}
|
||||
@@ -932,6 +934,11 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, Logging {
|
||||
return
|
||||
}
|
||||
|
||||
isNavigationDisabled = true
|
||||
defer {
|
||||
isNavigationDisabled = false
|
||||
}
|
||||
|
||||
if selectPrevUnreadArticleInTimeline() {
|
||||
return
|
||||
}
|
||||
@@ -948,6 +955,11 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, Logging {
|
||||
return
|
||||
}
|
||||
|
||||
isNavigationDisabled = true
|
||||
defer {
|
||||
isNavigationDisabled = false
|
||||
}
|
||||
|
||||
if selectNextUnreadArticleInTimeline() {
|
||||
return
|
||||
}
|
||||
@@ -959,7 +971,6 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, Logging {
|
||||
selectNextUnreadFeed() {
|
||||
self.selectNextUnreadArticleInTimeline()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func scrollOrGoToNextUnread() {
|
||||
|
||||
Reference in New Issue
Block a user