Skip to content

Conversation

aaronleopold
Copy link

@aaronleopold aaronleopold commented Feb 19, 2025

Resolves #98

Opening as a draft because I am not a Swift dev, so I likely used bad patterns. However, the timer is functional in its current state. Happy to iterate as needed to get it to better Swift standards!

As a side note, I imagine we could pull some of this in order to also add this functionality to rasmuslos/ShelfPlayer#193

Without timer set Screenshot 2025-02-19 at 12 17 36 PM
With timer set Screenshot 2025-02-19 at 12 17 43 PM

Comment on lines +100 to +111
commandCenter.enableLanguageOptionCommand.isEnabled = true
commandCenter.enableLanguageOptionCommand.addTarget { [unowned self] event in
// TODO: get a value somehow?
setSleepTimer(minutes: 30)
return .success
}

commandCenter.disableLanguageOptionCommand.isEnabled = true
commandCenter.disableLanguageOptionCommand.addTarget { [unowned self] event in
cancelSleepTimer()
return .success
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these are actually needed, left it in just in case I should have something here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature request] Sleep timer

1 participant