diff --git a/main/ipc.js b/main/ipc.js index 08e305ff..8d7dd3ac 100644 --- a/main/ipc.js +++ b/main/ipc.js @@ -57,10 +57,6 @@ function init () { ipcMain.on('blockPowerSave', blockPowerSave) ipcMain.on('unblockPowerSave', unblockPowerSave) - - ipcMain.on('log', function (e, message) { - console.log(message) - }) } function setBounds (bounds) { diff --git a/renderer/index.js b/renderer/index.js index 4ed209bb..d1b32d0d 100644 --- a/renderer/index.js +++ b/renderer/index.js @@ -257,9 +257,7 @@ function jumpToTime (time) { function setupIpc () { ipcRenderer.send('ipcReady') - ipcRenderer.on('dispatch', function (e, action, ...args) { - dispatch(action, ...args) - }) + ipcRenderer.on('dispatch', (e, ...args) => dispatch(...args)) ipcRenderer.on('showOpenTorrentAddress', function (e) { state.modal = 'open-torrent-address-modal' @@ -283,7 +281,7 @@ function setupIpc () { function loadState (callback) { cfg.read(function (err, data) { if (err) console.error(err) - ipcRenderer.send('log', 'loaded state from ' + cfg.filePath) + console.log('loaded state from ' + cfg.filePath) // populate defaults if they're not there state.saved = Object.assign({}, state.defaultSavedState, data) @@ -305,7 +303,7 @@ function resumeTorrents () { // Write state.saved to the JSON state file function saveState () { - ipcRenderer.send('log', 'saving state to ' + cfg.filePath) + console.log('saving state to ' + cfg.filePath) cfg.write(state.saved, function (err) { if (err) console.error(err) update()