Pref: start automatically on login

This commit is contained in:
Noam Okman
2016-09-02 15:47:03 +03:00
committed by DC
parent 3a4906079b
commit 3e85289318
9 changed files with 83 additions and 6 deletions

View File

@@ -123,7 +123,9 @@ function onState (err, _state) {
document.addEventListener('webkitvisibilitychange', onVisibilityChange)
// Done! Ideally we want to get here < 500ms after the user clicks the app
sound.play('STARTUP')
if (electron.remote.getCurrentWindow().isVisible()) {
sound.play('STARTUP')
}
console.timeEnd('init')
}