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

Added Discord timeout #192

Merged
merged 1 commit into from
Mar 24, 2021
Merged

Added Discord timeout #192

merged 1 commit into from
Mar 24, 2021

Conversation

semvis123
Copy link
Contributor

This adds a timeout, that clears the Discord rich presence after being paused for a specific time.
This was requested in #185

Copy link
Owner

@th-ch th-ch left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the contribution! Merging ✅

@@ -29,7 +31,13 @@ module.exports = (win) => {
// Add an idle icon to show that the song is paused
activityInfo.smallImageKey = "idle";
activityInfo.smallImageText = "idle/paused";
// Set start the timer so the activity gets cleared after a while if enabled
if (activityTimoutEnabled)
clearActivity = setTimeout(()=>rpc.clearActivity(), activityTimoutTime||10,000);
Copy link
Owner

Choose a reason for hiding this comment

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

nit: fallback (10,000) is not the same as the default (60,000), not sure if it's expected

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I did that on purpose, if you delete the config / don't have the config, it defaults to 10 seconds, could maybe be changed so that people that are upgrading from older versions generate that config.

@th-ch th-ch merged commit 304ad6e into th-ch:master Mar 24, 2021
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