Merge pull request #2111 from kielgillard/ios-release

Command + I can be used to get info on a feed…
This commit is contained in:
Maurice Parker 2020-05-26 17:58:20 -05:00 committed by GitHub
commit 702ce79bd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 2 deletions

View File

@ -167,6 +167,9 @@ private extension KeyboardManager {
let nextDownTitle = NSLocalizedString("Select Next Down", comment: "Select Next Down") let nextDownTitle = NSLocalizedString("Select Next Down", comment: "Select Next Down")
keys.append(KeyboardManager.createKeyCommand(title: nextDownTitle, action: "selectNextDown:", input: UIKeyCommand.inputDownArrow, modifiers: [])) keys.append(KeyboardManager.createKeyCommand(title: nextDownTitle, action: "selectNextDown:", input: UIKeyCommand.inputDownArrow, modifiers: []))
let getFeedInfo = NSLocalizedString("Get Feed Info", comment: "Get Feed Info")
keys.append(KeyboardManager.createKeyCommand(title: getFeedInfo, action: "showFeedInspector:", input: "i", modifiers: .command))
return keys return keys
} }
@ -191,6 +194,9 @@ private extension KeyboardManager {
let toggleStarredTitle = NSLocalizedString("Toggle Starred Status", comment: "Toggle Starred Status") let toggleStarredTitle = NSLocalizedString("Toggle Starred Status", comment: "Toggle Starred Status")
keys.append(KeyboardManager.createKeyCommand(title: toggleStarredTitle, action: "toggleStarred:", input: "l", modifiers: [.command, .shift])) keys.append(KeyboardManager.createKeyCommand(title: toggleStarredTitle, action: "toggleStarred:", input: "l", modifiers: [.command, .shift]))
let getFeedInfo = NSLocalizedString("Get Feed Info", comment: "Get Feed Info")
keys.append(KeyboardManager.createKeyCommand(title: getFeedInfo, action: "showFeedInspector:", input: "i", modifiers: .command))
let toggleSidebar = NSLocalizedString("Toggle Sidebar", comment: "Toggle Sidebar") let toggleSidebar = NSLocalizedString("Toggle Sidebar", comment: "Toggle Sidebar")
keys.append(KeyboardManager.createKeyCommand(title: toggleSidebar, action: "toggleSidebar:", input: "s", modifiers: [.command, .control])) keys.append(KeyboardManager.createKeyCommand(title: toggleSidebar, action: "toggleSidebar:", input: "s", modifiers: [.command, .control]))

View File

@ -470,6 +470,10 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
self?.coordinator.markAllAsReadInTimeline() self?.coordinator.markAllAsReadInTimeline()
} }
} }
@objc func showFeedInspector(_ sender: Any?) {
coordinator.showFeedInspector()
}
// MARK: API // MARK: API

View File

@ -174,7 +174,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
coordinator.navigateToDetail() coordinator.navigateToDetail()
} }
@objc func showFeedInspector(_ sender: UITapGestureRecognizer) { @objc func showFeedInspector(_ sender: Any?) {
coordinator.showFeedInspector() coordinator.showFeedInspector()
} }

View File

@ -1109,7 +1109,9 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
} }
func showFeedInspector() { func showFeedInspector() {
guard let feed = timelineFeed as? WebFeed else { let timelineWebFeed = timelineFeed as? WebFeed
let articleFeed = currentArticle?.webFeed
guard let feed = timelineWebFeed ?? articleFeed else {
return return
} }
showFeedInspector(for: feed) showFeedInspector(for: feed)