Remove some extraneous code in main.js

Attempted settings save on close may be a problem
Had multiple handlers for media-permissions events
This commit is contained in:
Scott Nonnenberg 2018-08-10 12:46:04 -07:00
parent 516a729a45
commit 3c49e59d6b

View file

@ -290,7 +290,6 @@ function createWindow() {
const debouncedCaptureStats = _.debounce(captureAndSaveWindowStats, 500);
mainWindow.on('resize', debouncedCaptureStats);
mainWindow.on('move', debouncedCaptureStats);
mainWindow.on('close', captureAndSaveWindowStats);
mainWindow.on('focus', () => {
mainWindow.flashFrame(false);
@ -738,14 +737,6 @@ ipc.on('draw-attention', () => {
}
});
ipc.on('set-media-permissions', (event, enabled) => {
userConfig.set('mediaPermissions', enabled);
});
ipc.on('get-media-permissions', event => {
// eslint-disable-next-line no-param-reassign
event.returnValue = userConfig.get('mediaPermissions') || false;
});
ipc.on('restart', () => {
app.relaunch();
app.quit();