TryQuiet / quiet

A private, p2p alternative to Slack and Discord built on Tor & IPFS
https://www.tryquiet.org
GNU General Public License v3.0
1.97k stars 86 forks source link

Desktop app should try to prevent itself from being suspended or sleep / powersave turning on. #53

Open holmesworcester opened 2 years ago

holmesworcester commented 2 years ago

Sometimes we have a problem with registration where the registrar user has the app open and their computer powered on and connected, but where their computer has gone on suspend.

I think this is easy to fix because Electron lets us request that the OS not suspend when the app is running. https://www.electronjs.org/docs/latest/api/power-save-blocker

We should do this.

We should confirm that it does not prevent sleep/suspend over a user action requesting sleep/suspend, e.g. when the laptop lid is closed.

holmesworcester commented 2 years ago

let's cap the time we spend on this to a couple hours, since it's not critical at this stage.