From: masakih Date: Mon, 13 Aug 2018 00:33:16 +0000 (+0900) Subject: 不要となっていたプロパティを削除 X-Git-Url: http://git.osdn.net/view?p=kcd%2FKCD.git;a=commitdiff_plain;h=127f6d561a45c79e630b251d1ff2ef89a3d5ad06 不要となっていたプロパティを削除 --- diff --git a/KCD/AppDelegate.swift b/KCD/AppDelegate.swift index aa684aff..f4fba398 100644 --- a/KCD/AppDelegate.swift +++ b/KCD/AppDelegate.swift @@ -117,11 +117,6 @@ final class AppDelegate: NSObject { return windowManager.createNewBrowser() } - - @objc func fire(_ timer: Timer) { - - updaters.forEach { $0() } - } } // MARK: - IBActions @@ -277,12 +272,10 @@ extension AppDelegate: NSApplicationDelegate { exit(0) } - NSUserNotificationCenter.default.delegate = self - Timer.scheduledTimer(timeInterval: 0.33, - target: self, - selector: #selector(AppDelegate.fire(_:)), - userInfo: nil, - repeats: true) + Timer.scheduledTimer(withTimeInterval: 0.33, repeats: true) { [weak self] _ in + + self?.updaters.forEach { $0() } + } } func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {