Skip to content
This repository has been archived by the owner on Mar 6, 2022. It is now read-only.

Suspend/resume modules on absence/presence #83

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

qistoph
Copy link

@qistoph qistoph commented Sep 5, 2019

Add the configurable functionality to suspend all visible modules on absence and resume the modules when a user is present.

Copy link
Collaborator

@eric-h-st eric-h-st left a comment

Choose a reason for hiding this comment

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

This is a great idea, but I would suggest to make use of the existing code and timer that counts the same period and is being set and cleared in different scenarios, not covered here.
Thank you!

package.json Outdated
@@ -24,7 +24,7 @@
"postinstall": "node_modules/.bin/electron-rebuild -e ../../node_modules/electron"
},
"dependencies": {
"onoff": "latest",
"electron-rebuild": "^1.2.1"
"electron-rebuild": "^1.10.1",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why limit the versions?

clearTimeout(self.suspendTimeout);
module.resume();
} else { // User not present
setTimeout(function() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why set a separate timeout? Would it not be better to use the timeout defined in note_helper.js for reactivation, instead?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants