Skip to content

Commit

Permalink
Debugging commit for trying autoUpdater
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonkearns committed Feb 9, 2017
1 parent 1aa83dc commit f95c5b9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
27 changes: 26 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const electron = require('electron')
const {ipcMain, globalShortcut, app, Tray, BrowserWindow, dialog} = require('electron')
const {ipcMain, globalShortcut, app, Tray, BrowserWindow, dialog, autoUpdater} = require('electron')

const path = require('path')
const url = require('url')
Expand Down Expand Up @@ -144,6 +144,13 @@ const createTray = () => {
tray.on('click', onClickTrayIcon)
}

function showDialog(message) {
dialog.showMessageBox({
type: 'info',
message: message
})
}

function createWindows() {
createWindow()
createTray()
Expand All @@ -166,6 +173,24 @@ function createWindows() {
globalShortcut.register('CommandOrControl+Shift+;', () => {
copyActiveMobsters()
})
autoUpdater.logger = log;
autoUpdater.on('checking-for-update', () => {
showDialog('checking-for-update')
});

autoUpdater.on('update-available', () => {
showDialog('update-available')
});

autoUpdater.on('update-downloaded', () => {
showDialog('update-downloaded')
});

autoUpdater.on('update-not-available', () => {
showDialog('update-not-available')
});
showDialog('about to search for updates')
autoUpdater.checkForUpdates()
}
function copyActiveMobsters() {
mainWindow.webContents.send('copy-active-mobsters')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Mobster",
"version": "0.0.5",
"version": "0.0.4",
"description": "A cross-platform mob programming timer built on web technologies",
"main": "main.js",
"scripts": {
Expand Down

0 comments on commit f95c5b9

Please sign in to comment.