File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ let caffeineTaskStatusChangedNotificationKey = "io.raphaelhanneken.espresso.caff
3333/// Manages the caffeinate task.
3434final class CaffeineController {
3535 /// Holds a reference to the caffeinate task.
36- private var caffeine : Task ?
36+ private var caffeine : Process ?
3737
3838 /// Checks whether a caffeinate task is currently running.
3939 var active : Bool {
@@ -75,9 +75,9 @@ final class CaffeineController {
7575 /// Creates and configures a caffeinate Task object.
7676 ///
7777 /// - returns: A configured and launched caffeinate task object.
78- private func caffeinateTask( ) -> Task ? {
78+ private func caffeinateTask( ) -> Process ? {
7979 // Create a new task object.
80- let caffeinate = Task ( )
80+ let caffeinate = Process ( )
8181 // Set the task's properties and launch it.
8282 caffeinate. launchPath = " /usr/bin/caffeinate "
8383 caffeinate. arguments = [ " -diu " ]
Original file line number Diff line number Diff line change @@ -51,6 +51,6 @@ final class PreferenceManager {
5151 /// Register the default preferences.
5252 private func registerDefaultPreferences( ) {
5353 // Disable activateOnLaunch by default.
54- userDefaults. register ( [ activateOnLaunchKey: false ] )
54+ userDefaults. register ( defaults : [ activateOnLaunchKey: false ] )
5555 }
5656}
You can’t perform that action at this time.
0 commit comments