From 2297d218c03aad19892b7ac7034377dfa474f7e5 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Mon, 18 May 2020 09:23:42 +0800 Subject: [PATCH] Uses selector syntax. --- iOS/Inspector/WebFeedInspectorViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iOS/Inspector/WebFeedInspectorViewController.swift b/iOS/Inspector/WebFeedInspectorViewController.swift index a518a8777..bb3522edf 100644 --- a/iOS/Inspector/WebFeedInspectorViewController.swift +++ b/iOS/Inspector/WebFeedInspectorViewController.swift @@ -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 {