-
Notifications
You must be signed in to change notification settings - Fork 261
Patch: Allow option to disable telemetry #362
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
base: main
Are you sure you want to change the base?
Conversation
|
Hey @nisrulz! Thanks for this PR. I'm entirely open to merging it. Your code however also blocks the built in update. The setting check should only block unidentified analytics. The calls to Github and Icanhazip are used to see if the laptop is online and can thus check for updates safely. |
app/modules/battery.js
Outdated
| // Check for network | ||
| const online = await Promise.race( [ | ||
| exec_async( `${ path_fix } curl -I https://icanhazip.com &> /dev/null` ).then( () => true ).catch( () => false ), | ||
| exec_async( `${ path_fix } curl -I https://github.com &> /dev/null` ).then( () => true ).catch( () => false ) | ||
| ] ) | ||
| log( `Internet online: ${ online }` ) | ||
| // Check for network only if telemetry is enabled | ||
| let online = false; | ||
| if (get_telemetry_setting()) { | ||
| online = await Promise.race([ | ||
| exec_async(`${path_fix} curl -I https://icanhazip.com &> /dev/null`).then(() => true).catch(() => false), | ||
| exec_async(`${path_fix} curl -I https://github.com &> /dev/null`).then(() => true).catch(() => false) | ||
| ]); | ||
| log(`Internet online: ${online}`); | ||
| } else { | ||
| log('Internet check skipped because telemetry is not enabled'); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@actuallymentor are you pointing to this code? If I revert this part, then the PR would align with what you are expecting, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My reasoning to put this also behind the flag, was to make sure the app was completely offline.
Would you be okay, if I added another option "Offline Mode", that can give the user option to go completely offline. The sane default would be false, but if the user wants to choose to go into offline mode, they are aware that no update would be checked for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated my PR to revert the change.
If you agree then, I can open a new one for "Offline mode".
e37f7a8 to
5509f12
Compare
5509f12 to
079082e
Compare
|
Looks good! Is there a reason you made the |
I actually took inference from existing menu item before it: but you are right, making it I will remove and retest everything again. |
|
@actuallymentor I have updated the PR. |
|
@actuallymentor do you want me to make more changes or is the PR in good shape now? |
Note
I am aware the telemetry in place is for a reason as mentioned in the readme

I just think in all fairness, the user should have a choice to disable it if they care about it so much. This is why the sane default it still
trueto respect the original developer's choice.Also the original developer did express that they are open to this kind of PR.
Testing
I verified it by running
..and checking the logs.
Some screenshots
Logs: