Skip to content

Commit 2994a1d

Browse files
author
Emmanouil Konstantinidis
committed
Clean Up
1 parent 37ad3c5 commit 2994a1d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

main.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ require('crash-reporter').start();
77
var Menu = require('menu');
88
var Tray = require('tray');
99
var BrowserWindow = require('browser-window');
10-
var AutoLaunch = require('auto-launch')
11-
, start = new AutoLaunch({
12-
name: 'Gitify',
13-
path: process.execPath.match(/.*?\.app/)[0]
14-
});
10+
var AutoLaunch = require('auto-launch');
1511

1612
var iconIdle = path.join(__dirname, 'images', 'tray-idleTemplate.png');
1713
var iconActive = path.join(__dirname, 'images', 'tray-active.png');
1814

15+
var autoStart = new AutoLaunch({
16+
name: 'Gitify',
17+
path: process.execPath.match(/.*?\.app/)[0]
18+
});
19+
1920
app.on('ready', function(){
2021
var appIcon = new Tray(iconIdle);
2122
initWindow();
@@ -100,11 +101,11 @@ app.on('ready', function(){
100101
});
101102

102103
ipc.on('startup-enable', function() {
103-
start.enable();
104+
autoStart.enable();
104105
});
105106

106107
ipc.on('startup-disable', function() {
107-
start.disable();
108+
autoStart.disable();
108109
});
109110

110111
ipc.on('app-quit', function() {

0 commit comments

Comments
 (0)