mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-29 00:31:14 +00:00
Fix arrow-key navigation between panels in 2-panel and collapsed layouts, not just when all 3 panels are visible. Fixes #3138.
This commit is contained in:
1 parent
096bdca75b
commit
49991f09d0
2 files changed
+103
-12
No files matched your search
@@ -26,6 +26,13 @@ final class RootSplitViewController: UISplitViewController {
|
||||
}
|
||||
|
||||
override func show(_ column: UISplitViewController.Column) {
|
||||
show(column, bypassDisplayModeRestriction: false)
|
||||
}
|
||||
|
||||
/// Pass `bypassDisplayModeRestriction: true` for user-initiated keyboard navigation, so it can
|
||||
/// reveal a column the display-mode suppression below would otherwise keep hidden.
|
||||
/// <https://github.com/Ranchero-Software/NetNewsWire/issues/3138>
|
||||
func show(_ column: UISplitViewController.Column, bypassDisplayModeRestriction: Bool) {
|
||||
guard !coordinator.isNavigationDisabled else { return }
|
||||
|
||||
/// Always show the column on iPhone
|
||||
@@ -37,15 +44,17 @@ final class RootSplitViewController: UISplitViewController {
|
||||
/// In certain scenarios, we don't want to select a feed or article
|
||||
/// and have the display mode change as this interferes with state
|
||||
/// restoration of the feeds and timeline display modes.
|
||||
if !bypassDisplayModeRestriction {
|
||||
|
||||
/// Don't show primary when the preferred display mode is timeline + article or article only.
|
||||
if column == .primary && (preferredDisplayMode == .oneBesideSecondary || preferredDisplayMode == .secondaryOnly) {
|
||||
return
|
||||
}
|
||||
/// Don't show primary when the preferred display mode is timeline + article or article only.
|
||||
if column == .primary && (preferredDisplayMode == .oneBesideSecondary || preferredDisplayMode == .secondaryOnly) {
|
||||
return
|
||||
}
|
||||
|
||||
/// Don't show the timeline when the preferred display mode is article only.
|
||||
if column == .supplementary && preferredDisplayMode == .secondaryOnly {
|
||||
return
|
||||
/// Don't show the timeline when the preferred display mode is article only.
|
||||
if column == .supplementary && preferredDisplayMode == .secondaryOnly {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
super.show(column)
|
||||
|
||||
Reference in new issue
Block a user