Change focus when the sidebar is shown or hidden. Issue #1004
This commit is contained in:
parent
229aada857
commit
118ce73c08
|
@ -384,7 +384,7 @@
|
|||
<menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleSidebar:" target="Ady-hI-5gd" id="dOo-rp-1f6"/>
|
||||
<action selector="toggleTheSidebar:" target="Ady-hI-5gd" id="1hl-EZ-ao4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="jKG-b2-ZWf"/>
|
||||
|
|
|
@ -226,7 +226,7 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
|||
return validateToggleReadArticles(item)
|
||||
}
|
||||
|
||||
if item.action == #selector(toggleSidebar(_:)) {
|
||||
if item.action == #selector(toggleTheSidebar(_:)) {
|
||||
guard let splitViewItem = sidebarSplitViewItem else {
|
||||
return false
|
||||
}
|
||||
|
@ -360,8 +360,14 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
|||
nextUnread(sender)
|
||||
}
|
||||
|
||||
@IBAction func toggleSidebar(_ sender: Any?) {
|
||||
@IBAction func toggleTheSidebar(_ sender: Any?) {
|
||||
splitViewController!.toggleSidebar(sender)
|
||||
guard let splitViewItem = sidebarSplitViewItem else { return }
|
||||
if splitViewItem.isCollapsed {
|
||||
currentTimelineViewController?.focus()
|
||||
} else {
|
||||
sidebarViewController?.focus()
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func markAboveArticlesAsRead(_ sender: Any?) {
|
||||
|
|
Loading…
Reference in New Issue