Merge pull request #1101 from kielgillard/1099-double-click-to-open-homepage

Double clicking a feed in the side bar…
This commit is contained in:
Maurice Parker 2019-10-06 18:10:32 -05:00 committed by GitHub
commit f66587ab96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -47,6 +47,7 @@ protocol SidebarDelegate: class {
sidebarCellAppearance = SidebarCellAppearance(fontSize: AppDefaults.sidebarFontSize)
outlineView.dataSource = dataSource
outlineView.doubleAction = #selector(doubleClickedSidebar(_:))
outlineView.setDraggingSourceOperationMask([.move, .copy], forLocal: true)
outlineView.registerForDraggedTypes([FeedPasteboardWriter.feedUTIInternalType, FeedPasteboardWriter.feedUTIType, .URL, .string])
@ -153,6 +154,13 @@ protocol SidebarDelegate: class {
}
deleteNodes(selectedNodes)
}
@IBAction func doubleClickedSidebar(_ sender: Any?) {
guard outlineView.clickedRow == outlineView.selectedRow else {
return
}
openInBrowser(sender)
}
@IBAction func openInBrowser(_ sender: Any?) {
guard let feed = singleSelectedFeed, let homePageURL = feed.homePageURL else {