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

@@ -20,6 +20,7 @@ const windows = require('./windows')
let shouldQuit = false
let argv = sliceArgv(process.argv)
const hidden = argv.includes('--hidden')
if (config.IS_PRODUCTION) {
// When Electron is running in production mode (packaged app), then run React
@@ -67,7 +68,7 @@ function init () {
app.on('ready', function () {
isReady = true
windows.main.init()
windows.main.init({hidden: hidden})
windows.webtorrent.init()
menu.init()
@@ -155,6 +156,8 @@ function processArgv (argv) {
dialog.openTorrentFile()
} else if (arg === '-u') {
dialog.openTorrentAddress()
} else if (arg === '--hidden') {
// Igonre hidden argument, already being handled
} else if (arg.startsWith('-psn')) {
// Ignore Mac launchd "process serial number" argument
// Issue: https://github.com/feross/webtorrent-desktop/issues/214