From 054c7fb40939ddfbe4cb79d9e5c519b949d13f06 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 17 Feb 2018 18:26:17 -0800 Subject: [PATCH] Remove unused references to AppNavigationKeyPressed. --- Evergreen/AppNotifications.swift | 2 -- .../MainWindow/MainWindowController.swift | 19 ------------------- 2 files changed, 21 deletions(-) diff --git a/Evergreen/AppNotifications.swift b/Evergreen/AppNotifications.swift index b2e419cab..5ea7cac55 100644 --- a/Evergreen/AppNotifications.swift +++ b/Evergreen/AppNotifications.swift @@ -14,8 +14,6 @@ extension Notification.Name { static let SidebarSelectionDidChange = Notification.Name("SidebarSelectionDidChangeNotification") static let TimelineSelectionDidChange = Notification.Name("TimelineSelectionDidChangeNotification") - static let AppNavigationKeyPressed = Notification.Name("AppNavigationKeyPressedNotification") - static let UserDidAddFeed = Notification.Name("UserDidAddFeedNotification") // Sent by DetailViewController when mouse hovers over link in web view. diff --git a/Evergreen/MainWindow/MainWindowController.swift b/Evergreen/MainWindow/MainWindowController.swift index a9f93c8fd..b047149b1 100644 --- a/Evergreen/MainWindow/MainWindowController.swift +++ b/Evergreen/MainWindow/MainWindowController.swift @@ -53,8 +53,6 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations { NotificationCenter.default.addObserver(self, selector: #selector(applicationWillTerminate(_:)), name: NSApplication.willTerminateNotification, object: nil) - NotificationCenter.default.addObserver(self, selector: #selector(appNavigationKeyPressed(_:)), name: .AppNavigationKeyPressed, object: nil) - NotificationCenter.default.addObserver(self, selector: #selector(refreshProgressDidChange(_:)), name: .AccountRefreshDidBegin, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(refreshProgressDidChange(_:)), name: .AccountRefreshDidFinish, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(refreshProgressDidChange(_:)), name: .AccountRefreshProgressDidChange, object: nil) @@ -87,23 +85,6 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations { window?.saveFrame(usingName: windowAutosaveName) } - @objc func appNavigationKeyPressed(_ note: Notification) { - - guard let navigationKey = note.userInfo?[UserInfoKey.navigationKeyPressed] as? Int else { - return - } - guard let contentView = window?.contentView, let view = note.object as? NSView, view.isDescendant(of: contentView) else { - return - } - - if navigationKey == NSRightArrowFunctionKey { - handleRightArrowFunctionKey(in: view) - } - if navigationKey == NSLeftArrowFunctionKey { - handleLeftArrowFunctionKey(in: view) - } - } - @objc func refreshProgressDidChange(_ note: Notification) { CoalescingQueue.standard.add(self, #selector(makeToolbarValidate))