diff --git a/MoeStreamer.xcodeproj/project.pbxproj b/MoeStreamer.xcodeproj/project.pbxproj index 52dd044..e1e7cb8 100644 --- a/MoeStreamer.xcodeproj/project.pbxproj +++ b/MoeStreamer.xcodeproj/project.pbxproj @@ -665,7 +665,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 0.17.6; + MARKETING_VERSION = 0.17.7; PRODUCT_BUNDLE_IDENTIFIER = com.zhiayang.MoeStreamer; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = ""; @@ -700,7 +700,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 0.17.6; + MARKETING_VERSION = 0.17.7; PRODUCT_BUNDLE_IDENTIFIER = com.zhiayang.MoeStreamer; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = ""; diff --git a/MoeStreamer/src/AppDelegate.swift b/MoeStreamer/src/AppDelegate.swift index 216989b..a9f04ed 100644 --- a/MoeStreamer/src/AppDelegate.swift +++ b/MoeStreamer/src/AppDelegate.swift @@ -26,18 +26,19 @@ class AppDelegate : NSObject, NSApplicationDelegate globalMediaKeyHandler.enable(Settings.get(.shouldUseMediaKeys()), musicCon: self.controller.getModel().controller()) +/* // register the sleep handler, so we pause on sleep. NSWorkspace.shared.notificationCenter.addObserver(self, selector: #selector(AppDelegate.onSleep), name: NSWorkspace.willSleepNotification, object: nil) NSWorkspace.shared.notificationCenter.addObserver(self, selector: #selector(AppDelegate.onWake), name: NSWorkspace.didWakeNotification, object: nil) - +*/ DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { self.controller.showPopover() } } - +/* @objc func onSleep() { Logger.log(msg: "pausing playback due to sleep") @@ -58,7 +59,7 @@ class AppDelegate : NSObject, NSApplicationDelegate self.controller.getModel().poke() } } - +*/ func applicationWillTerminate(_ aNotification: Notification) { globalMediaKeyHandler.enable(false, musicCon: self.controller.getModel().controller())