mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Add deep linking to Mac app.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import UserNotifications
|
||||
import Articles
|
||||
import Account
|
||||
import RSCore
|
||||
@@ -112,6 +113,12 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
||||
return sidebarViewController?.selectedObjects
|
||||
}
|
||||
|
||||
func handle(_ response: UNNotificationResponse) {
|
||||
let userInfo = response.notification.request.content.userInfo
|
||||
sidebarViewController?.deepLinkRevealAndSelect(for: userInfo)
|
||||
currentTimelineViewController?.goToDeepLink(for: userInfo)
|
||||
}
|
||||
|
||||
// MARK: - Notifications
|
||||
|
||||
// func window(_ window: NSWindow, willEncodeRestorableState state: NSCoder) {
|
||||
|
||||
Reference in New Issue
Block a user