Browse Source

Added command parameter to prevent update

"--without-update"
Fixes #647
v0.5.8
Ramiro Saenz 8 years ago
parent
commit
aeb280e4b2
  1. 2
      app/Application.js
  2. 4
      electron/main.js

2
app/Application.js

@ -34,7 +34,7 @@ Ext.define('Rambox.Application', {
Rambox.ux.Auth0.init();
// Check for updates
Rambox.app.checkUpdate(true);
if ( require('electron').remote.process.argv.indexOf('--without-update') === -1 ) Rambox.app.checkUpdate(true);
// Add shortcuts to switch services using CTRL + Number
var map = new Ext.util.KeyMap({

4
electron/main.js

@ -156,7 +156,7 @@ function createWindow () {
tray.create(mainWindow, config);
if ( fs.existsSync(path.resolve(path.dirname(process.execPath), '..', 'Update.exe')) ) updater.initialize(mainWindow);
if ( fs.existsSync(path.resolve(path.dirname(process.execPath), '..', 'Update.exe')) && process.argv.indexOf('--without-update') === -1 ) updater.initialize(mainWindow);
// Open links in default browser
mainWindow.webContents.on('new-window', function(e, url, frameName, disposition, options) {
@ -184,7 +184,7 @@ function createWindow () {
// Navigate the window forward when the user hits their mouse forward button
if ( cmd === 'browser-forward' ) mainWindow.webContents.executeJavaScript('if(Ext.cq1("app-main")) Ext.cq1("app-main").getActiveTab().goForward();');
});
// Emitted when the window is closed.
mainWindow.on('close', function(e) {
if ( !isQuitting ) {

Loading…
Cancel
Save