Electron API updates

A couple of changes to properties rather than functions and the
register*Protocol functionsd are now synchronous and so don't need
a completion callback.
This commit is contained in:
David Baker 2019-12-10 18:02:20 +00:00
parent 680caed505
commit a13c0e0be5
2 changed files with 3 additions and 6 deletions

View File

@ -180,7 +180,7 @@ process.on('uncaughtException', function(error) {
let focusHandlerAttached = false;
ipcMain.on('setBadgeCount', function(ev, count) {
app.setBadgeCount(count);
app.badgeCount = count;
if (count === 0 && mainWindow) {
mainWindow.flashFrame(false);
}
@ -543,8 +543,6 @@ app.on('ready', async () => {
callback({
path: absTarget,
});
}, (error) => {
if (error) console.error('Failed to register protocol');
});
if (argv['no-update']) {

View File

@ -66,10 +66,9 @@ const template = [
// macOS has specific menu conventions...
if (process.platform === 'darwin') {
// first macOS menu is the name of the app
const name = app.getName();
template.unshift({
label: name,
// first macOS menu is the name of the app
label: app.name,
submenu: [
{ role: 'about' },
{ type: 'separator' },