Uses selector syntax.

This commit is contained in:
Stuart Breckenridge 2020-05-18 09:23:42 +08:00
parent 6224dfad03
commit 2297d218c0
No known key found for this signature in database
GPG Key ID: 977FF9C8CE7AB207
1 changed files with 3 additions and 3 deletions

View File

@ -55,9 +55,8 @@ class WebFeedInspectorViewController: UITableViewController {
NotificationCenter.default.addObserver(self, selector: #selector(webFeedIconDidBecomeAvailable(_:)), name: .WebFeedIconDidBecomeAvailable, object: nil)
NotificationCenter.default.addObserver(forName: UIApplication.willEnterForegroundNotification, object: nil, queue: .main, using: { _ in
self.updateNotificationSettings()
})
NotificationCenter.default.addObserver(self, selector: #selector(updateNotificationSettings), name: UIApplication.willEnterForegroundNotification, object: nil)
}
override func viewDidAppear(_ animated: Bool) {
@ -197,6 +196,7 @@ extension WebFeedInspectorViewController: UITextFieldDelegate {
extension WebFeedInspectorViewController {
@objc
func updateNotificationSettings() {
UNUserNotificationCenter.current().getNotificationSettings { (settings) in
DispatchQueue.main.async {