Remove unnecessary system notification checks
This commit is contained in:
parent
3aad0b5075
commit
b6c66a7f2c
@ -11,11 +11,6 @@ import Combine
|
|||||||
import RSCore
|
import RSCore
|
||||||
import Articles
|
import Articles
|
||||||
|
|
||||||
extension Notification.Name {
|
|
||||||
static let appleColorPreferencesChangedNotification = Notification.Name("AppleColorPreferencesChangedNotification")
|
|
||||||
static let appleInterfaceThemeChangedNotification = Notification.Name("AppleInterfaceThemeChangedNotification")
|
|
||||||
}
|
|
||||||
|
|
||||||
protocol WebViewControllerDelegate: class {
|
protocol WebViewControllerDelegate: class {
|
||||||
func webViewController(_: WebViewController, articleExtractorButtonStateDidUpdate: ArticleExtractorButtonState)
|
func webViewController(_: WebViewController, articleExtractorButtonStateDidUpdate: ArticleExtractorButtonState)
|
||||||
}
|
}
|
||||||
@ -67,8 +62,6 @@ class WebViewController: NSViewController {
|
|||||||
NotificationCenter.default.addObserver(self, selector: #selector(webFeedIconDidBecomeAvailable(_:)), name: .WebFeedIconDidBecomeAvailable, object: nil)
|
NotificationCenter.default.addObserver(self, selector: #selector(webFeedIconDidBecomeAvailable(_:)), name: .WebFeedIconDidBecomeAvailable, object: nil)
|
||||||
NotificationCenter.default.addObserver(self, selector: #selector(avatarDidBecomeAvailable(_:)), name: .AvatarDidBecomeAvailable, object: nil)
|
NotificationCenter.default.addObserver(self, selector: #selector(avatarDidBecomeAvailable(_:)), name: .AvatarDidBecomeAvailable, object: nil)
|
||||||
NotificationCenter.default.addObserver(self, selector: #selector(faviconDidBecomeAvailable(_:)), name: .FaviconDidBecomeAvailable, object: nil)
|
NotificationCenter.default.addObserver(self, selector: #selector(faviconDidBecomeAvailable(_:)), name: .FaviconDidBecomeAvailable, object: nil)
|
||||||
DistributedNotificationCenter.default().addObserver(self, selector: #selector(appleColorPreferencesChanged(_:)), name: .appleColorPreferencesChangedNotification, object: nil)
|
|
||||||
DistributedNotificationCenter.default().addObserver(self, selector: #selector(appleInterfaceThemeChanged(_:)), name: .appleInterfaceThemeChangedNotification, object: nil)
|
|
||||||
|
|
||||||
statusBarView = WebStatusBarView()
|
statusBarView = WebStatusBarView()
|
||||||
statusBarView.translatesAutoresizingMaskIntoConstraints = false
|
statusBarView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
@ -100,14 +93,6 @@ class WebViewController: NSViewController {
|
|||||||
reloadArticleImage()
|
reloadArticleImage()
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func appleColorPreferencesChanged(_ note: Notification) {
|
|
||||||
loadWebView()
|
|
||||||
}
|
|
||||||
|
|
||||||
@objc func appleInterfaceThemeChanged(_ note: Notification) {
|
|
||||||
loadWebView()
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: API
|
// MARK: API
|
||||||
|
|
||||||
func focus() {
|
func focus() {
|
||||||
|
@ -5618,6 +5618,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 51C0519824A7808F00194D5E /* NetNewsWire_multiplatform_macOSapp_target.xcconfig */;
|
baseConfigurationReference = 51C0519824A7808F00194D5E /* NetNewsWire_multiplatform_macOSapp_target.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 11.0;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@ -5625,6 +5626,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 51C0519824A7808F00194D5E /* NetNewsWire_multiplatform_macOSapp_target.xcconfig */;
|
baseConfigurationReference = 51C0519824A7808F00194D5E /* NetNewsWire_multiplatform_macOSapp_target.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 11.0;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user