OSDN Git Service

不要となっていたプロパティを削除
authormasakih <masakih@users.sourceforge.jp>
Mon, 13 Aug 2018 00:33:16 +0000 (09:33 +0900)
committermasakih <masakih@users.sourceforge.jp>
Mon, 13 Aug 2018 00:33:16 +0000 (09:33 +0900)
KCD/AppDelegate.swift

index aa684af..f4fba39 100644 (file)
@@ -117,11 +117,6 @@ final class AppDelegate: NSObject {
         
         return windowManager.createNewBrowser()
     }
         
         return windowManager.createNewBrowser()
     }
-    
-    @objc func fire(_ timer: Timer) {
-        
-        updaters.forEach { $0() }
-    }
 }
 
 // MARK: - IBActions
 }
 
 // MARK: - IBActions
@@ -277,12 +272,10 @@ extension AppDelegate: NSApplicationDelegate {
             exit(0)
         }
         
             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 {
     }
     
     func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {