Make 'Restart Signal' actually restart Signal

Previously it would just reload the page.

// FREEBIE
This commit is contained in:
lilia 2017-05-07 14:39:43 -07:00 committed by Scott Nonnenberg
parent bc71f4aa2b
commit 7c6da5a157
No known key found for this signature in database
GPG key ID: A4931C09644C654B
3 changed files with 9 additions and 1 deletions

View file

@ -177,7 +177,7 @@
'click .showSettings': 'showSettings',
'select .gutter .conversation-list-item': 'openConversation',
'input input.search': 'filterContacts',
'click .restart-signal': 'reloadBackgroundPage',
'click .restart-signal': window.restart,
'show .lightbox': 'showLightbox',
'click .migrate': 'confirmMigration'
},

View file

@ -212,3 +212,7 @@ ipc.on('draw-attention', function(event, count) {
}, 1000);
}
});
ipc.on('restart', function(event) {
app.relaunch();
app.quit();
});

View file

@ -19,6 +19,10 @@
console.log('show window');
ipc.send('show-window');
};
window.restart = function() {
console.log('restart');
ipc.send('restart');
};
/**
* Enables spell-checking and the right-click context menu in text editors.
* Electron (`webFrame.setSpellCheckProvider`) only underlines misspelled words;