Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spotrem: some refactoring shortening the code #3127

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

thyttan
Copy link
Collaborator

@thyttan thyttan commented Dec 11, 2023

I did some refactoring to spotrem when working on the slider module. I've been using the changes since then.

I guess it could be taken further. There's pretty much duplication inside the command objects (e.g. categories: ["android.intent.category.DEFAULT"]). But this change was easy to start with.

Originally posted by @thyttan in #2953 (comment)

Copy link
Collaborator

@bobrippling bobrippling left a comment

Choose a reason for hiding this comment

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

Nice, looks really compact and factored! I've just one small suggestion but I'm happy if you'd prefer to stick with the string comparison code instead

apps/spotrem/app.js Show resolved Hide resolved
@bobrippling bobrippling merged commit 6f0e9ab into espruino:master Dec 14, 2023
1 check passed
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.

2 participants